Menu ▾ ▴

#3053 [ds390] FATAL Compiler Internal Error on code using variable argument pointers

closed-fixed
None
other
5
2026-10-20
2020-06-14
No
#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.

Discussion

  • Christopher Bazley

    • assigned_to: Christopher Bazley
     
  • Christopher Bazley

    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

     
  • Christopher Bazley

    • status: open --> closed-fixed
     
  • Christopher Bazley

    Regression test added as [r17055]

     

    Related

    Commit: [r17055]


Log in to post a comment.