Bug 42465 - internal compiler error: in extract_insn, at recog.c:2001
Summary: internal compiler error: in extract_insn, at recog.c:2001
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.4
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-12-22 17:09 UTC by gccbugzilla
Modified: 2014-04-26 00:42 UTC (History)
4 users (show)

See Also:
Host:
Target: powerpc-ibm-aix6.1.2.0
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-04-26 00:00:00


Attachments
The output of -save-temps (316.87 KB, application/zip)
2009-12-22 17:12 UTC, gccbugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gccbugzilla 2009-12-22 17:09:38 UTC
I am experiencing the above error when compiling a Boost Math test. The output of g++ -v is below and I will attach the preprocessed sources.

/usr/bin/g++ -v -save-temps -o build/debug/vendor/boost_1_39_0/libs/math/octonion/octonion_test.o -c -Wall -Wno-unused -maix32 -O0 -ffloat-store -g -pthread -mxl-compat -fPIC -mno-fp-in-toc -mno-sum-in-toc -fno-threadsafe-statics -fpermissive -Wno-missing-braces -D_DEBUG -DBOOST_ALL_NO_LIB -DBOOST_SPIRIT_THREADSAFE -Ivendor/boost_1_39_0 vendor/boost_1_39_0/libs/math/octonion/octonion_test.cpp
Using built-in specs.
Target: powerpc-ibm-aix6.1.2.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++ --prefix=/opt/gcc434 --enable-threads=posix --enable-tls --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-gmp=/opt/freeware
Thread model: aix
gcc version 4.3.4 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'build/debug/vendor/boost_1_39_0/libs/math/octonion/octonion_test.o' '-c' '-Wall' '-Wno-unused' '-maix32' '-O0' '-ffloat-store' '-g' '-pthread' '-mxl-compat' '-fPIC' '-mno-fp-in-toc' '-mno-sum-in-toc' '-fno-threadsafe-statics' '-fpermissive' '-Wno-missing-braces' '-D_DEBUG' '-DBOOST_ALL_NO_LIB' '-DBOOST_SPIRIT_THREADSAFE' '-Ivendor/boost_1_39_0' '-shared-libgcc'
 /opt/gcc434/libexec/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/cc1plus -E -quiet -v -Ivendor/boost_1_39_0 -imultilib pthread -D_ALL_SOURCE -D__COMPATMATH__ -D_THREAD_SAFE -D_DEBUG -DBOOST_ALL_NO_LIB -DBOOST_SPIRIT_THREADSAFE vendor/boost_1_39_0/libs/math/octonion/octonion_test.cpp -maix32 -mxl-compat -mno-fp-in-toc -mno-sum-in-toc -Wall -Wno-unused -Wno-missing-braces -ffloat-store -fPIC -fno-threadsafe-statics -fpermissive -fworking-directory -O0 -fpch-preprocess -o octonion_test.ii
ignoring nonexistent directory "/opt/gcc434/lib/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/../../../../powerpc-ibm-aix6.1.2.0/include"
#include "..." search starts here:
#include <...> search starts here:
 vendor/boost_1_39_0
 /opt/gcc434/lib/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/include/c++
 /opt/gcc434/lib/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/include/c++/powerpc-ibm-aix6.1.2.0/pthread
 /opt/gcc434/lib/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/include/c++/backward
 /usr/local/include
 /opt/gcc434/include
 /opt/gcc434/lib/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/include
 /opt/gcc434/lib/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'build/debug/vendor/boost_1_39_0/libs/math/octonion/octonion_test.o' '-c' '-Wall' '-Wno-unused' '-maix32' '-O0' '-ffloat-store' '-g' '-pthread' '-mxl-compat' '-fPIC' '-mno-fp-in-toc' '-mno-sum-in-toc' '-fno-threadsafe-statics' '-fpermissive' '-Wno-missing-braces' '-D_DEBUG' '-DBOOST_ALL_NO_LIB' '-DBOOST_SPIRIT_THREADSAFE' '-Ivendor/boost_1_39_0' '-shared-libgcc'
 /opt/gcc434/libexec/gcc/powerpc-ibm-aix6.1.2.0/4.3.4/cc1plus -fpreprocessed octonion_test.ii -quiet -dumpbase octonion_test.cpp -maix32 -mxl-compat -mno-fp-in-toc -mno-sum-in-toc -auxbase-strip build/debug/vendor/boost_1_39_0/libs/math/octonion/octonion_test.o -g -O0 -Wall -Wno-unused -Wno-missing-braces -version -ffloat-store -fPIC -fno-threadsafe-statics -fpermissive -o octonion_test.s
GNU C++ (GCC) version 4.3.4 (powerpc-ibm-aix6.1.2.0)
        compiled by GNU C version 4.3.4, GMP version 4.3.1, MPFR version 2.4.1-p5.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e9638aa3a22c713b1251b5cd2218f306
vendor/boost_1_39_0/boost/math/octonion.hpp: In function 'bool boost::math::operator==(const boost::math::quaternion<T>&, const boost::math::octonion<T>&) [with T = long double]':
vendor/boost_1_39_0/boost/math/octonion.hpp:1786: error: unrecognizable insn:
(insn 237 236 238 vendor/boost_1_39_0/boost/math/octonion.hpp:1785 (set (reg:DF 37 5)
        (mem/u/c:DF (plus:SI (reg:SI 2 2)
                (const:SI (minus:SI (symbol_ref/u:SI ("*LC..26") [flags 0x2])
                        (symbol_ref:SI ("*LCTOC..1"))))) [0 S8 A8])) -1 (nil))
vendor/boost_1_39_0/boost/math/octonion.hpp:1786: internal compiler error: in extract_insn, at recog.c:2001
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 gccbugzilla 2009-12-22 17:12:38 UTC
Created attachment 19373 [details]
The output of -save-temps

Zip file. Unfortunately files were too big to attach so I had to compress them.
Comment 2 Paolo Carlini 2009-12-22 18:10:46 UTC
It would be nice if could provide a manageable reproducer. Did you try delta already?

  http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction

Thanks in advance.
Comment 3 gccbugzilla 2009-12-22 18:11:52 UTC
Nope, I did not. Will take a look.
Comment 4 Andrew Pinski 2009-12-22 18:16:11 UTC
Also you might want to try 4.4.2 which has fixed some TOC related ICEs.
Comment 5 gccbugzilla 2009-12-22 18:22:31 UTC
U(In reply to comment #4)
> Also you might want to try 4.4.2 which has fixed some TOC related ICEs.
> 

Unfortunately, I am stuck with this version but I will try that to find out if it does fix the issue to make a case for upgrading.

It seems to be related to the use of long double. Does that make any sense?
Comment 6 gccbugzilla 2009-12-22 19:52:56 UTC
(In reply to comment #2)
> It would be nice if could provide a manageable reproducer. Did you try delta
> already?
> 
>   http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
> 
> Thanks in advance.

Do you know how long it is expected to take? It's been running since you suggested it. I just want to know if it is guaranteed to finish at some point.
Comment 7 gccbugzilla 2009-12-30 15:24:19 UTC
Ok, I ran the delta program for a few days and got this message:

Died at /home/s.somani/thirdparty/delta-2006.08.03/delta line 123, <> line 64641

Doh!

I'll try and see if I can get another test case.
Comment 8 gccbugzilla 2009-12-30 15:39:19 UTC
Aha, found a small test case:

int main()
{
  long double d;
  bool b = static_cast<long double>(0) == d;
}
Comment 9 gccbugzilla 2009-12-30 15:41:40 UTC
I've narrowed it down to this invocation:

g++ -o octonion_test.o -c -mxl-compat ld_break.cpp

So it's caused by some interaction with -mxl-compat
Comment 10 David Edelsohn 2014-04-26 00:39:45 UTC
Apparently confirmed.
Comment 11 David Edelsohn 2014-04-26 00:42:30 UTC
I do not know when this was fixed, but all of the recent versions that I can test do not exhibit the failure. GCC 4.6, 4.7, 4.8, 4.9.