From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 Description of problem: gcc-4 fails to compile correct code with ICE in make_decl_rtl. Version-Release number of selected component (if applicable): gcc-4.0.0-5 How reproducible: Always Steps to Reproduce: petr-lx:/tmp$ /usr/bin/gcc -O2 bad.c bad.c:14: internal compiler error: in make_decl_rtl, at varasm.c:868 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccayquSO.out file, please attach this to your bugreport. petr-lx:/tmp$ cat /tmp/ccayquSO.out // /usr/libexec/gcc/i386-redhat-linux/4.0.0/cc1 -quiet bad.c -quiet -dumpbase bad.c -auxbase bad -O2 -o - -frandom-seed=0 # 1 "bad.c" # 1 "<built-in>" # 1 "<command line>" # 1 "bad.c" struct inner { char item; }; struct outer { struct inner member; }; struct inner * const ptr = (&((struct outer * const) (0x40000000))->member); void Monitor_DebugRegistersInit(void) { ptr->item = 0; } petr-lx:/tmp$ /usr/bin/gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux Thread model: posix gcc version 4.0.0 20050512 (Red Hat 4.0.0-5) Actual Results: gcc crashes with ICE as shown above. Expected Results: gcc producing correct code - like what happens without using '-O2'. Additional info:
Should be fixed in gcc-4.0.0-6.