gcc

g++ ICE: in elimination_costs_in_insn, at reload1.c:3633

Bug #1042658 reported by Xerxes Rånby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
Won't Fix
Undecided
Unassigned
gcc
Confirmed
Medium

Bug Description

Use the attached preprocessed compile.i source code to trigger the bug.

g++ compile.i
In file included from src/machine.h:14:0,
                 from src/compile.cpp:11:
src/common.h:279:1: note: the mangling of ‘va_list’ has changed in GCC 4.4
src/compile.cpp: In function ‘void {anonymous}::local::compile({anonymous}::local::MyThread*, {anonymous}::local::Frame*, unsigned int, int)’:
src/compile.cpp:6211:1: internal compiler error: in elimination_costs_in_insn, at reload1.c:3633
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccPPh5os.out file, please attach this to your bugreport.

#The preprocessed compile.i got generated during a debug build of avian
#Full avian debug build instructions below:
apt-get openjdk-7-jdk libz-dev git
git clone https://github.com/ReadyTalk/avian.git
cd avian
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-armhf/ make openjdk=/usr/lib/jvm/java-7-openjdk-armhf/ mode=debug

Revision history for this message
In , Belagod (belagod) wrote :

The attached test causes gcc to ICE when compiled with -O0.

$ arm-eabi-gcc -c foo.c
foo.c: In function 'f0a':
foo.c:16:1: warning: left shift count >= width of type [enabled by default]
foo.c:16:1: warning: left shift count >= width of type [enabled by default]
foo.c:16:1: warning: right shift count >= width of type [enabled by default]
foo.c:16:1: warning: right shift count >= width of type [enabled by default]
foo.c:16:1: warning: right shift count >= width of type [enabled by default]
foo.c:16:1: warning: left shift count >= width of type [enabled by default]
foo.c:16:1: warning: left shift count >= width of type [enabled by default]
foo.c:16:1: warning: right shift count >= width of type [enabled by default]
foo.c:16:1: warning: right shift count >= width of type [enabled by default]
foo.c:16:1: warning: right shift count >= width of type [enabled by default]
foo.c:18:1: internal compiler error: in elimination_costs_in_insn, at reload1.c:3643
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Revision history for this message
In , Belagod (belagod) wrote :

Created attachment 24002
test case with complex expressions

Revision history for this message
In , Rguenth (rguenth) wrote :

Please specify the compiler version you used.

Revision history for this message
In , Mikpe (mikpe) wrote :

I can trigger the ICE on armv5tel-unknown-linux-gnueabi with gcc-4.7-20110416 and gcc-4.6-20110415 if I pass both -O0 and -march=armv7-a. Doesn't ICE with -O2 or -march=armv5te. Also doesn't ICE with gcc-4.5 or gcc-4.4 regardless of options.

Revision history for this message
In , Belagod (belagod) wrote :

Sorry for the delay: this is my gcc -v:

arm-eabi-gcc
COLLECT_LTO_WRAPPER=.../trunk/2011-04-20/install-a9softfpneon/bin/../libexec/gcc/arm-eabi/4.7.0/lto-wrapper
Target: arm-eabi
Configured with: .../trunk/source/gcc-fsf/configure --target=arm-eabi --enable-checking=release --disable-gdbtk --disable-werror --disable-tui --disable-rda --disable-sid --disable-utils --disable-lto --with-cpu=cortex-a9 --with-float=softfp --with-fpu=neon --prefix=.../trunk/2011-04-20/install-a9softfpneon --with-mpfr=.../tools/linux_x86_64 --with-mpc=.../tools/linux_x86_64 --with-gmp=.../tools/linux_x86_64 --disable-lto --disable-werror --disable-shared --disable-nls --disable-threads --disable-tls --enable-checking=yes --enable-languages=c,c++,fortran --with-newlib
Thread model: single
gcc version 4.7.0 20110420 (experimental) (GCC)

Revision history for this message
Xerxes Rånby (xranby) wrote :
Revision history for this message
Xerxes Rånby (xranby) wrote :

This bug is reproducible using:
g++ --version
g++ (Debian 4.6.3-8+rpi1) 4.6.3

Revision history for this message
Xerxes Rånby (xranby) wrote :

pi@raspberrypi ~ $ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-8+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-8+rpi1)

summary: - g++ internal compiler error: in elimination_costs_in_insn, at
- reload1.c:3633
+ g++ ICE: in elimination_costs_in_insn, at reload1.c:3633
Revision history for this message
Xerxes Rånby (xranby) wrote :

The crash looks remotely similar to the upsteam gcc bug

Changed in gcc:
importance: Undecided → Unknown
status: New → Unknown
Changed in gcc:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
peter green (plugwash) wrote :

"The crash looks remotely similar to the upsteam gcc bug"
I don't think the two bugs are the same. The upstream bug you linked is reported as happening in 4.7 while this bug only happens with 4.6.

I do not intend to fix or push upstream bugs in 4.6 that do not also happen in 4.7. Please just use 4.7 in such cases.

Changed in raspbian:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.