The following code fails to compile for me:
void a(unsigned char * b);
a(&(*(unsigned char *)0));
The code above is in a file called test.c (attached below). I invoked sdcc with the command `sdcc -c test.c`.
My sdcc -v is: SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 2.9.7 #5891 (Jul 26 2010) (MINGW32)
I am running Windows Vista 64-bit, Service Pack 1.
The error message I get from SDCC is:
test.c:4: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCicode.c' line number '1401' : operandOperation invalid operator
Contact Author with source code
Assertion failed: 0, file /home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCicode.c, line 1403
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Caught signal 22: SIGABRT
The only workaround I know of is to remove the unary address (&) and dereference (*) operators.
P.S. Thank you for fixing the last bug I reported, I really appreciate it!