struct some_struct
{
int i;
};
void f(int n, ...);
int main()
{
struct some_struct x[1];
f(0, x[0]);
}
Compiling this with sdcc-sdcc test.c gives a SIGSEGV with the version being SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ez80_z80/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 4.0.0 #11528 (Linux)
We've had a lot of fixes for struct parameters since. This works now, and I've also added a regression test for it in [r15194].
Related
Commit: [r15194]
Last edit: Philipp Klaus Krause 2025-02-09