#include <stdarg.h>
int g(va_list ap);
void f(const char* s, ...)
{
va_list *a[1], **b = a;
g(**b);
++b;
g(**b);
}
Compiling with sdcc test.c -mds390. This results in test.c:10: error 9: FATAL Compiler Internal Error in file 'gen.c' line number '1152' : AOP_STR with DPTR in use!. Tested with commit 11672.
Exact DS390 sample now compiles without AOP_STR internal error and warns 346 about the invalid dereference. Original failure was in the DS390 backend.
https://godbolt.org/z/KMr5fKner
Regression test added as [r17055]
Related
Commit: [r17055]