1: Sample code that reproduces the problem.
struct S { int x; };
int f(struct S s)
{
return s ? 1 : 2;
}
2: Exact command used to run SDCC on this sample code
sdcc -mz80 bug.c
3: SDCC version tested
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/r4k/r5k/r6k/sm83/tlcs90/ez80/z80n/r800/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502/mos65c02/huc6280/f8/f8l TD- 4.6.4 #16997 (Linux)
4: Copy of the error message or incorrect output, or a clear description of the observed versus expected behavior.
No diagnostic message is produced, although ISO C mandates one.
See https://godbolt.org/z/YcGPYn3xo
This is a duplicate of [bugs:#4084].
Related
Bugs: #4084