http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47626
Summary: internal compiler error: in print_reg (only for i686, and i486, not x86_64) Product: gcc Version: 4.4.6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: lappisstud...@hotmail.com Created attachment 23259 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23259 minimal code to trigger internal compiler error Attached code triggers an internal compiler error for these versions of gcc (when 32-bit build, host, and target supplied to configure) gcc version 4.4.5 (GCC) gcc version 4.4.6 20110201 (prerelease) (GCC) gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) <==fails for 32-bit, does however work for x86_64 variants Attached code does however work on "gcc version 4.5.2 (GCC)". System type: Ubuntu 10.10 running under virtualbox, ubuntu 10.04 on an atom N270, and a friends laptop. cmdline triggering bug: gcc -c -O3 -o main.o main.cc Error messages: =====[gcc version 4.4.5 (GCC)]===== main.cc: In function ‘int main(int, char**)’: main.cc:41: internal compiler error: in print_reg, at config/i386/i386.c:10678 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. =====[gcc version 4.4.6 20110201 (prerelease) (GCC)]===== main.cc: In function ‘int main(int, char**)’: main.cc:41: internal compiler error: in print_reg, at config/i386/i386.c:10717 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. =====[gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)]===== main.cc: In function ‘int main(int, char**)’: main.cc:41: internal compiler error: in print_reg, at config/i386/i386.c:10811 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. =====[gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)]===== main.cc: In function ‘int main(int, char**)’: main.cc:41: internal compiler error: in print_reg, at config/i386/i386.c:10673 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. Configurations: =====[gcc version 4.4.5 (GCC)]===== Using built-in specs. Target: i686-linux-gnu Configured with: ./configure --enable-languages=c,c++ --prefix=/usr/local --program-suffix=-4.4.5_ppl --enable-clocale=gnu --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.4.5 (GCC) =====[gcc version 4.4.6 20110201 (prerelease) (GCC)]===== Using built-in specs. Target: i686-linux-gnu Configured with: ./configure --enable-languages=c,c++ --prefix=/usr/local --program-suffix=-4.4-20110201_ppl --enable-clocale=gnu --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix =====[gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)]===== Using built-in specs. Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) =====[gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)]===== Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) Additional information: This is probably related to #47596, which was marked as "resolved" since it worked for a few tested releases (target was i686-w64-mingw32). My code seems to be reproducible on i686-linux-gnu and i486-linux-gnu targets. Code compiles without problem when telling compiler it's "c" instead of "c++", or when not supplying either "-O2" or "-O3". (or when looping fewer times, see comment in source). * These packages was installed besides ubuntu 10.10 to build the non-ubuntu gcc releases and snapshot, and since compiling the attached code worked with my compilation of gcc 4.5.2, I hope these libraries didn't mess things up too badly. libmpfr-dev 3.0.0-2 libmpfr4 3.0.0-2 libgmp3-dev 2:4.3.2+dfsg-1ubuntu1 libgmp3c2 2:4.3.2+dfsg-1ubuntu1 libgmpxx4ldbl 2:4.3.2+dfsg-1ubuntu1 libmpc-dev 0.8.2-1build1 libmpc2 0.8.2-1build1 libcloog-ppl-dev 0.15.9-2 libcloog-ppl0 0.15.9-2 libppl-c2 0.10.2-7ubuntu1 libppl0.10-dev 0.10.2-7ubuntu1 libppl7 0.10.2-7ubuntu1 /Simon Gustafsson