the exact version of GCC is 4.1.1 the system type is i686-pc-cygwin the options given when GCC was configured/built: --prefix=/tmp/local/unixutil/gcc-4.1.1 --with-local-prefix=/usr/local/myCompanyName ("myCompanyName" is not the exact wording) (also, there is a symlink /tmp/local/unixutil/gcc -> gcc-4.1.1) the complete command line that triggers the bug: /tmp/local/unixutil/gcc/bin/gcc -O -Wall -Wextra -c zim.c the compiler output (error messages, warnings, etc.): stdout: nothing stderr: zim.c: In function 'ffff': zim.c:16: error: unrecognizable insn: (insn 20 19 21 2 (set (reg:SI 66) (const:SI (plus:SI (mem:SI (symbol_ref:SI ("#i.vvvv") <var_decl 0x194500b0 vvvv>) [0 S4 A8]) (const_int 4 [0x4])))) -1 (nil) (nil)) zim.c:16: internal compiler error: in extract_insn, at recog.c:2084 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. zim.o: not created the preprocessed file: see below additional remarks: 1) if "-O" is removed, all seems OK 2) if "__attribute__((dllimport))" is removed, all seems OK 3) if "-Wall" or "-Wextra" is removed, no change (still crash) ---zim.i----------------------------------------------------- # 1 "zim.c" # 1 "<built-in>" # 1 "<command line>" # 1 "zim.c" struct ssss { const char *xxxx1; const char *xxxx2; }; extern __attribute__((dllimport)) struct ssss vvvv[]; int zzzz(); int ffff() { int i; for (i = 0; i < 2; i++) { zzzz(vvvv[i].xxxx2); }; return(0); }; -------------------------------------------------------------
To be connected to Bug 29825.
(In reply to comment #1) > To be connected to Bug 29825. No that is unrelated.
This is related to PR 27924 and I bet really a dup.
Confirmed.
*** Bug 27924 has been marked as a duplicate of this bug. ***
This testcase and the one in 27924 now compile successfully on gcc version 4.2.0 20070218 (prerelease) and gcc version 4.3.0 20070218 (experimental) on i686-pc-mingw32 Danny
*** Bug 31275 has been marked as a duplicate of this bug. ***
Fixed.
*** Bug 31347 has been marked as a duplicate of this bug. ***
*** Bug 31457 has been marked as a duplicate of this bug. ***
I'm sorry to drag this back up again, but it happened again on 4.2. Again it is with the gettext package which seems to love me so much. Using built-in specs. Target: i686-pc-mingw32 Configured with: ../gcc-4.2/configure --prefix=/crosstools/gccwin --target=i686-pc-mingw32 --enable-shared --enable-threads --disable-multilib --disable-nls --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-c99 --enable-long-long --enable-sjlj-exceptions --enable-libada --enable-boehm-gc Thread model: win32 gcc version 4.2.0 20070403 (prerelease) It ICEs with the following. make[4]: Entering directory `/mnt/hd2/build/gettextbuild/gettext-tools/src' /bin/sh ../libtool --tag=CC --mode=compile i686-pc-mingw32-gcc -DLOCALEDIR=\"/crosstools/gccwin/share/locale\" -DBISON_LOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/crosstools/gccwin/share/locale\" -DUSEJEXE=0 -DGETTEXTJEXEDIR=\"/crosstools/gccwin/lib/gettext\" -DGETTEXTJAR=\"/crosstools/gccwin/share/gettext/gettext.jar\" -DLIBDIR=\"/crosstools/gccwin/lib\" -DGETTEXTDATADIR=\"/crosstools/gccwin/share/gettext\" -DPROJECTSDIR=\"/crosstools/gccwin/share/gettext/projects\" -DHAVE_CONFIG_H -I. -I.. -I../../../gettext-0.16.1/gettext-tools/src -I. -I../../../gettext-0.16.1/gettext-tools/src -I.. -I../../../gettext-0.16.1/gettext-tools -I../../../gettext-0.16.1/gettext-tools/libgrep -I../../../gettext-0.16.1/gettext-tools/libuniname -I../gnulib-lib -I../../../gettext-0.16.1/gettext-tools/gnulib-lib -I../intl -I../../../gettext-0.16.1/gettext-tools/../gettext-runtime/intl -I/crosstools/gccwin/include -g -O2 -c -o msgl-check.lo ../../../gettext-0.16.1/gettext-tools/src/msgl-check.c i686-pc-mingw32-gcc -DLOCALEDIR=\"/crosstools/gccwin/share/locale\" -DBISON_LOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/crosstools/gccwin/share/locale\" -DUSEJEXE=0 -DGETTEXTJEXEDIR=\"/crosstools/gccwin/lib/gettext\" -DGETTEXTJAR=\"/crosstools/gccwin/share/gettext/gettext.jar\" -DLIBDIR=\"/crosstools/gccwin/lib\" -DGETTEXTDATADIR=\"/crosstools/gccwin/share/gettext\" -DPROJECTSDIR=\"/crosstools/gccwin/share/gettext/projects\" -DHAVE_CONFIG_H -I. -I.. -I../../../gettext-0.16.1/gettext-tools/src -I. -I../../../gettext-0.16.1/gettext-tools/src -I.. -I../../../gettext-0.16.1/gettext-tools -I../../../gettext-0.16.1/gettext-tools/libgrep -I../../../gettext-0.16.1/gettext-tools/libuniname -I../gnulib-lib -I../../../gettext-0.16.1/gettext-tools/gnulib-lib -I../intl -I../../../gettext-0.16.1/gettext-tools/../gettext-runtime/intl -I/crosstools/gccwin/include -g -O2 -c ../../../gettext-0.16.1/gettext-tools/src/msgl-check.c -DDLL_EXPORT -DPIC -o .libs/msgl-check.o ../../../gettext-0.16.1/gettext-tools/src/msgl-check.c: In function 'plural_help': ../../../gettext-0.16.1/gettext-tools/src/msgl-check.c:195: error: unrecognizable insn: (insn 40 39 41 6 ../../../gettext-0.16.1/gettext-tools/src/msgl-check.c:180 (set (reg:SI 76) (const:SI (plus:SI (mem:SI (symbol_ref:SI ("#i.plural_table") <var_decl 0x402449f8 plural_table>) [0 S4 A8]) (const_int 4 [0x4])))) -1 (nil) (nil)) ../../../gettext-0.16.1/gettext-tools/src/msgl-check.c:195: internal compiler error: in extract_insn, at recog.c:2077 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. I configured gettext with ../gettext-0.16.1/configure --prefix=/crosstools/gccwin --build=i686-pc-linux-gnu --host=i686-pc-mingw32 --disable-java --disable-native-java --with-libiconv-prefix=/crosstools/gccwin --disable-threads --disable-openmp If I am doing anything wrong here I'm open to suggestions.
*** Bug 31595 has been marked as a duplicate of this bug. ***
I'm going to try again since it seems my last post was just ignored. The test case works fine on 4.2 but it still occurs under some circumstances. As I stated in my previous post Gettext is where it dies but I can compile the original test case with no problems. The compiler I am using is a linux to mingw cross compiler configured as I stated below. It was built from mondays source with a 4.2 bootstrap compiler and binutils 2.17. To reiterate, the simple testcase works fine, but I still have this bug appear while compiling gettext using the cross compiler targetted at mingw.
(In reply to comment #13) > I'm going to try again since it seems my last post was just ignored. > The test case works fine on 4.2 but it still occurs under some circumstances. If you provide preprocessed source that reproduces the circumstances , as suggested, I will not ignore it. Danny
Don't you just hate idiots in these cases. (Yes, I am referring to myself here) Well, it's completely broken again on my system, look here. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31636 I apologise for being less than helpful here.
Created attachment 13403 [details] Patch for testcase in 31636 Could you please test the attached patch to tree-ssa-address.c which is a reversal of a fragment of the reversion of the 4.2.0 TLS emulation patch. After I re-re-reverted this patch in my local tree, I see the ICE in your testcase. Danny
Yup, that did it. Building the cross compiler with that patch fixed the test case ICE and the one I kept getting from gettext.