Following C++ program when compiled for H8/300 target, compiler generates an Internal Compiler Error. The error is observed on GCC 3.3 as well as GCC 3.4 branch. h8300-elf-g++ test.cc -S ------------------- test.cc Start ----------------------------- static unsigned int array1[7]; typedef struct { unsigned long sar; unsigned long dar; unsigned int cra; unsigned int crb; } DtcRamInfo; static const DtcRamInfo test = { 0, (((int)&array1[0]) & 0xFFFFFF), 7, 0 }; ------------------- test.cc End -----------------------------
Minimized down to int g; struct foo { int a; int b; }; struct foo bar = { 0, (((int) &g) & 0xFFFFFF) }; Confirmed with gcc-3.4 on i686-pc-linux-gnu (native). Confirmed with gcc-3.2.2 (RH9) on i686-pc-linux-gnu (native). Confirmed with gcc-3.4 on i686-pc-linux-gnu cross h8300-hms.
This is a dup of bug 11665 which was fixed for 3.3.2. *** This bug has been marked as a duplicate of 11665 ***