Created attachment 27343 [details] Preprocessed source. ICEs with -O1 and above, but not with -Os. Attempting to bootstrap gcc-4.8-20120506 on armv5tel-linux fails with: /mnt/scratch/objdir48/./gcc/xgcc -B/mnt/scratch/objdir48/./gcc/ -B/mnt/scratch/install48/armv5tel-unknown-linux-gnueabi/bin/ -B/mnt/scratch/install48/armv5tel-unknown-linux-gnueabi/lib/ -isystem /mnt/scratch/install48/armv5tel-unknown-linux-gnueabi/include -isystem /mnt/scratch/install48/armv5tel-unknown-linux-gnueabi/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -fno-inline -I. -I. -I../.././gcc -I/mnt/scratch/gcc-4.8-20120506/libgcc -I/mnt/scratch/gcc-4.8-20120506/libgcc/. -I/mnt/scratch/gcc-4.8-20120506/libgcc/../gcc -I/mnt/scratch/gcc-4.8-20120506/libgcc/../include -DHAVE_CC_TLS -o _mulvdi3.o -MT _mulvdi3.o -MD -MP -MF _mulvdi3.dep -DL_mulvdi3 -c /mnt/scratch/gcc-4.8-20120506/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS /mnt/scratch/gcc-4.8-20120506/libgcc/libgcc2.c: In function '__mulvdi3': /mnt/scratch/gcc-4.8-20120506/libgcc/libgcc2.c:397:1: internal compiler error: in df_uses_record, at df-scan.c:3179 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [_mulvdi3.o] Error 1 make[3]: Leaving directory `/mnt/scratch/objdir48/armv5tel-unknown-linux-gnueabi/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/mnt/scratch/objdir48' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/mnt/scratch/objdir48' make: *** [bootstrap] Error 2 gcc-4.8-20120422 did bootstrap Ok, 4.8-20120429 failed due to breakage with the armhf dynamic linker changes. Configuration parameters: /mnt/scratch/gcc-4.8-20120506/configure --prefix=/mnt/scratch/install48 --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,fortran,ada --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --disable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --disable-sjlj-exceptions --with-arch=armv5te --with-tune=xscale --build=armv5tel-unknown-linux-gnueabi --disable-plugin --disable-lto --disable-libmudflap --disable-build-poststage1-with-cxx
the subreg splitting pass is generating concatn in the insn stream. The manual says this isn't allowed.
Here's a reduced testcase from newlib where I hit the same issue. struct _reent { int _errno; }; typedef unsigned int wchar_t; unsigned long long _wcstoull_r(struct _reent *rptr , const wchar_t *nptr , wchar_t **endptr , int base) { register const wchar_t *s = nptr; register unsigned long long acc; register int c; register unsigned long long cutoff; register int neg = 0, any, cutlim; if(base < 0 || base == 1 || base > 36) { return(0ULL); } if ((base == 0 || base == 16) && c == L'0' && (*s == L'x' || *s == L'X')) { c = s[1]; } if (base == 0) base = c == L'0' ? 8 : 10; cutoff = (unsigned long long)(9223372036854775807LL * 2ULL + 1ULL) / (unsigned long long)base; for (acc = 0, any = 0;; c = *s++) { if (iswdigit(c)) break; if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) any = -1; else { acc += c; } } if (any < 0) { rptr->_errno = 34; } else if (neg) acc = -acc; }
The patch below appears to trigger the issue but there's a fundamental question as to why lower-subreg generates concatns when the documentation suggests that concat and concatn should only be used in declarations but not in the insn stream. http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00423.html
Ramana, I did not write this pass. I believe that iant did. he used concatn and concat as a temp marker in the rtl and if all went well, these are all removed before the pass finishes. Obviously something is no longer going well so we will have to look into it. Kenny
My fault (again).
Author: rsandifo Date: Tue May 8 21:42:03 2012 New Revision: 187299 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187299 Log: gcc/ PR rtl-optimization/53278 * lower-subreg.c (decompose_multiword_subregs): Remove left-over speed_p code from earlier patch. Modified: trunk/gcc/ChangeLog trunk/gcc/lower-subreg.c
Fixed.