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.
Created attachment 19373 [details] The output of -save-temps Zip file. Unfortunately files were too big to attach so I had to compress them.
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.
Nope, I did not. Will take a look.
Also you might want to try 4.4.2 which has fixed some TOC related ICEs.
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?
(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.
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.
Aha, found a small test case: int main() { long double d; bool b = static_cast<long double>(0) == d; }
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
Apparently confirmed.
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.