Re: ICE in gcc/libgcc2.c:566 (gcc trunk)
On 07 Feb 2007 15:36:14 -0800 Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > Can anybody else out there recreate this on their x86_64 system? Not that I could not recreate the segfault but I found a way to hide the segfault. Instead of optimizing with nocona make \ LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common" \ STAGE1_CFLAGS="-O" \ LIBPATH="/usr/lib/gcj-4.3.0_alpha20070209/lib64" \ BOOT_CFLAGS=" -O2 -mtune=nocona -march=nocona -pipe -msse3 -mfpmath=sse" \ bootstrap optimizing stage2/stage3 c compiler with core2 like make \ LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common" \ STAGE1_CFLAGS="-O" \ LIBPATH="/usr/lib/gcj-4.3.0_alpha20070209/lib64" \ BOOT_CFLAGS=" -O2 -mtune=core2 -march=core2 -pipe -msse3 -mssse3 -mfpmath=sse" \ bootstrap helps here. So, at least one can workaround this now. Regards, Hanno
Re: ICE in gcc/libgcc2.c:566 (gcc trunk)
On 07 Feb 2007 15:36:14 -0800 Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > Hanno Meyer-Thurow <[EMAIL PROTECTED]> writes: > > > sorry to bother again. I reduced the code (attached) that segfaults here > > on Core 2 Duo [1]. If I add -fno-split-wide-types the code does not > > segfault. > > That flag comes from your patchset [2]. > > I don't know what is causing this. I just checked again, and it does > not happen for me. Now I tried gcc trunk rev. 121750 with 'make bootstrap'. It still fails. Though, I have a smaller piece of code (attached) that segfaults. Any idea where to look for TItype / TI mode for nocona arch? ana gcc # ./cc1 -fsplit-wide-types test.c -o test.o __negti2 test.c: In function ‘__negti2’: test.c:7: internal compiler error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See http://bugs.gentoo.org/> for instructions. ana gcc # ./cc1 -fno-split-wide-types test.c -o test.o __negti2 Execution times (seconds) life info update : 0.01 (100%) usr 0.00 ( 0%) sys 0.01 (50%) wall 0 kB ( 0%) ggc TOTAL : 0.01 0.00 0.02 2256 kB Regards, Hanno typedef int TItype __attribute__ ((mode (TI))); TItype __negti2 (TItype u) { return u; }
Re: ICE in gcc/libgcc2.c:566 (gcc trunk)
On 07 Feb 2007 13:46:43 -0800 Ian Lance Taylor <[EMAIL PROTECTED]> wrote: > * lower-subreg.c (resolve_clobber): Handle a subreg of a concatn. Yes, that is there. I have revision 121690. Hanno
Re: ICE in gcc/libgcc2.c:566 (gcc trunk)
Hi Ian, sorry to bother again. I reduced the code (attached) that segfaults here on Core 2 Duo [1]. If I add -fno-split-wide-types the code does not segfault. That flag comes from your patchset [2]. execute: # ./cc1 -quiet -m64 -O1 test.c -o test.o Any ideas? Regards, Hanno [1] http://gcc.gnu.org/ml/gcc/2007-02/msg00095.html [2] http://gcc.gnu.org/ml/gcc-patches/2007-02/msg2.html typedef int TItype __attribute__ ((mode (TI))); typedef int DItype __attribute__ ((mode (DI))); typedef unsigned int UDItype __attribute__ ((mode (DI))); struct DWstruct {DItype low, high;}; typedef union { struct DWstruct s; TItype ll; } DWunion; TItype __multi3 (TItype u, TItype v) { const DWunion uu = {.ll = u}; const DWunion vv = {.ll = v}; DWunion w = { .ll = ({ DWunion __w; do { UDItype __x0, __x1, __x2, __x3; UDItype __ul, __vl, __uh, __vh; __ul = ((UDItype) (uu.s.low) & (((UDItype) 1 << ((8 * 8) / 2)) - 1)); __uh = ((UDItype) (uu.s.low) >> ((8 * 8) / 2)); __vl = ((UDItype) (vv.s.low) & (((UDItype) 1 << ((8 * 8) / 2)) - 1)); __vh = ((UDItype) (vv.s.low) >> ((8 * 8) / 2)); __x0 = (UDItype) __ul * __vl; __x1 = (UDItype) __ul * __vh; __x2 = (UDItype) __uh * __vl; __x3 = (UDItype) __uh * __vh; __x1 += ((UDItype) (__x0) >> ((8 * 8) / 2)); __x1 += __x2; if (__x1 < __x2) __x3 += ((UDItype) 1 << ((8 * 8) / 2)); (__w.s.high) = __x3 + ((UDItype) (__x1) >> ((8 * 8) / 2)); (__w.s.low) = ((UDItype) (__x1) & (((UDItype) 1 << ((8 * 8) / 2)) - 1)) * ((UDItype) 1 << ((8 * 8) / 2)) + ((UDItype) (__x0) & (((UDItype) 1 << ((8 * 8) / 2)) - 1)); } while (0); __w.ll; } )}; w.s.high += ((UDItype) uu.s.low * (UDItype) vv.s.high + (UDItype) uu.s.high * (UDItype) vv.s.low); return w.ll; }
ICE in gcc/libgcc2.c:566
Hi list! First, I am not subscribed to this list, so please CC me on answers, thanks! I try to build gcc trunk (r121622) on x86_64/core2duo but I get an ICE. Thanks for any help in advance! Regards, Hanno ___ Build config: # ./xgcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/configure --prefix=/usr/lib/gcj-4.3.0_alpha20070202 --libdir=/usr/lib/gcj-4.3.0_alpha20070202/lib64 --libexecdir=/usr/lib/gcj-4.3.0_alpha20070202/lib64 --with-gxx-include-dir=/usr/lib/gcj-4.3.0_alpha20070202/include/c++ --enable-languages=c,c++,java --enable-ssp --enable-libstdcxx-allocator=new --disable-static --disable-altivec --disable-gtktest --disable-glibtest --disable-multilib --disable-maintainer-mode --disable-libada --disable-libarttest --disable-libjava-multilib --disable-libmudflap --disable-libssp --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --enable-nls --without-included-gettext --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-java-awt=gtk --enable-plugin --disable-gconf-peer --with-java-home=/usr/lib/gcj-4.3.0_alpha20070202/jre Thread model: posix gcc version 4.3.0-alpha20070202 (experimental) (Gentoo 4.3.0_alpha20070202) ___ Build started with: make profiledbootstrap ___ Build error: make[4]: Leaving directory `/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/build/x86_64-unknown-linux-gnu/libgcc' /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/build/./gcc/xgcc -B/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/build/./gcc/ -B/usr/lib/gcj-4.3.0_alpha20070202/x86_64-unknown-linux-gnu/bin/ -B/usr/lib/gcj-4.3.0_alpha20070202/x86_64-unknown-linux-gnu/lib/ -isystem /usr/lib/gcj-4.3.0_alpha20070202/x86_64-unknown-linux-gnu/include -isystem /usr/lib/gcj-4.3.0_alpha20070202/x86_64-unknown-linux-gnu/sys-include -O2 -mtune=nocona -march=nocona -pipe -g -msse3 -mfpmath=sse -O2 -O2 -O2 -mtune=nocona -march=nocona -pipe -g -msse3 -mfpmath=sse -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc -I/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/. -I/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/../gcc -I/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/../include -I/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/../libdecnumber -I../../libdecnumber -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/../gcc/libgcc2.c \ -fvisibility=hidden -DHIDE_EXPORTS /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/../gcc/libgcc2.c: In function ‘__multi3’: /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/libgcc/../gcc/libgcc2.c:566: internal compiler error: Speicherzugriffsfehler (segmentation fault) Please submit a full bug report, with preprocessed source if appropriate. See http://bugs.gentoo.org/> for instructions. make[3]: *** [_muldi3.o] Fehler 1 make[3]: Leaving directory `/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/build/x86_64-unknown-linux-gnu/libgcc' make[2]: *** [all-stagefeedback-target-libgcc] Fehler 2 make[2]: Leaving directory `/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/build' make[1]: *** [stagefeedback-bubble] Fehler 2 make[1]: Leaving directory `/mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/build' make: *** [profiledbootstrap] Fehler 2 ___ GDB info: Program received signal SIGSEGV, Segmentation fault. 0x0055e7a8 in count_pseudo (reg=71) at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/reload1.c:1636 1636 nregs = hard_regno_nregs[r][PSEUDO_REGNO_MODE (reg)]; (gdb) print r $2 = -1 (gdb) bt #0 0x0055e7a8 in count_pseudo (reg=71) at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/reload1.c:1636 #1 0x005668a3 in reload (first=0x2b5e06f1c980, global=1) at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/reload1.c:1673 #2 0x007a900b in global_alloc () at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/global.c:628 #3 0x007a4e61 in rest_of_handle_global_alloc () at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/global.c:2516 #4 0x005246c6 in execute_one_pass (pass=0xa98c60) at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/passes.c:1024 #5 0x0052490a in execute_pass_list (pass=0xa98c60) at /mnt/data/tmp/portage/dev-java/gcj-4.3.0_alpha20070202/work/gcc/gcc/passes.c:1075 #6 0x