When compiling OpenCV (Intel Open Computer Vision Library), I get the following errors: cvfundam.cpp: In function `int icvCubicV(double, double, double, double*)': cvfundam.cpp:2187: internal compiler error: in emit_move_insn_1, at expr.c:3510
Read http://gcc.gnu.org/bugs.html and provide the preprocessed source file.
Created attachment 4758 [details] preprocessed file
Please also tell us which CPU you were compiling for. I can't compile your source for e.g. powerpc; I get the errors /usr/include/bits/mathinline.h: In function `double atan2(double, double)': /usr/include/bits/mathinline.h:425: error: unknown register name `st(1)' in `asm' /usr/include/bits/mathinline.h: In function `double log(double)': /usr/include/bits/mathinline.h:461: error: unknown register name `st(1)' in `asm' because your preprocessed source is processor-specific.
We would also have to know with which flags you compiled, since I can compile the code flawlessly on my x86 linux box. Please do as Andrew said and post the information listed on the bugs.html page -- i.e. including gcc -v output. W.
Sorry, I can't access the machine anymore (an Intellistation with a Intel Xeon Processor), but I got the code to compile with gcc-2.95.
Closing as there is no way to reproduce this bug.
Created attachment 5670 [details] Preprocessed cvfundam.cpp -> cvfundam.ii I could not compile OpenCV either, this is the preprocessed cvfundam.cpp
System used: Debian GNU/Linux unstable on Athlon XP Is this library just not compilable on a non-Intel machine? Hope this helps: cmdline: g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../include -I../.. -v -save-temps -g -mcpu=i686 -march=i686 -ffast-math -fomit-frame-pointer -O3 -DNDEBUG -Wall -fno-rtti -pipe -c cvfundam.cpp -MT cvfundam.lo -MD -MP -MF .deps/cvfundam.TPlo -fPIC -DPIC -o cvfundam.lo g++ output: g++: warning: -pipe ignored because -save-temps specified Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.3 20040125 (prerelease) (Debian) /usr/lib/gcc-lib/i486-linux/3.3.3/cc1plus -E -D__GNUG__=3 -quiet -v -I. -I. -I../.. -I. -I../include -I../.. -MD cvfundam.d -MF .deps/cvfundam.TPlo -MP -MT cvfundam.lo -MQ cvfundam.lo -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=3 -D_GNU_SOURCE -DHAVE_CONFIG_H -DNDEBUG -DPIC cvfundam.cpp -mcpu=i686 -march=i686 -Wall -ffast-math -fomit-frame-pointer -fno-rtti -fPIC -O3 cvfundam.ii ignoring nonexistent directory "/usr/i486-linux/include" ignoring duplicate directory "." ignoring duplicate directory "." ignoring duplicate directory "../.." #include "..." search starts here: #include <...> search starts here: . ../.. ../include /usr/include/c++/3.3 /usr/include/c++/3.3/i486-linux /usr/include/c++/3.3/backward /usr/local/include /usr/lib/gcc-lib/i486-linux/3.3.3/include /usr/include End of search list. /usr/lib/gcc-lib/i486-linux/3.3.3/cc1plus -fpreprocessed cvfundam.ii -quiet -dumpbase cvfundam.cpp -mcpu=i686 -march=i686 -auxbase-strip cvfundam.lo -g -O3 -Wall -version -ffast-math -fomit-frame-pointer -fno-rtti -fPIC -o cvfundam.s GNU C++ version 3.3.3 20040125 (prerelease) (Debian) (i486-linux) compiled by GNU C version 3.3.3 20040125 (prerelease) (Debian). GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64371 cvfundam.cpp: In function `int icvCubicV(double, double, double, double*)': cvfundam.cpp:2187: internal compiler error: in emit_move_insn_1, at expr.c:3510 Please submit a full bug report, with preprocessed source if appropriate.
I _can_ confirm this with the last attachment. I'm working on a reduced testcase. W.
Here is a reduced testcase: ------------------------ extern double pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double sin (double __x) throw (); void foo(double a2) { double p, q, D, c1, c2, ro1, ro2, fi1, fi2; double x[6][3]; int i; p = a2 * a2 / 3; if( D < 0 ) c2 = c1; else c2 = q / 2 - sqrt( D ); c2 = ( (ro1)<0 ? -1:((ro1)>0?1:0 ) ) * pow(ro1, 1./3.) + ( (ro1)<0 ? -1:((ro1)>0?1:0 ) ) * p / 3. * sin( ro1 ); for( i = 0; i < 6; i++ ) if( i < 3 ) { x[i][0] = sin( fi1 / 3.) * c1 - a2 / 3; x[i][1] = sin( fi1 / 3.) * c2; } } --------------------------------- g/x> /home/bangerth/bin/gcc-3.3.3-pre/bin/c++ -c x.ii -g -mcpu=i686 -march=i686 -fomit-frame-pointer -O3 -fno-rtti -fPIC -ffast-math x.ii: In function `void foo(double)': x.ii:26: internal compiler error: in emit_move_insn_1, at expr.c:3507 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. This is fixed for 3.4 and mainline, though.
As mentioned, this is fixed. W.
Wolfgang, isn't this a 3.3.3 regression?
Actually, you're right. I can only test with the 3.3.1 version that SuSE ships, but that one doesn't show the bug. Thinking about it again: I would be surprised if this was a bug that wasn't there before, but that just wasn't triggered. It may be some unrelated change. The same then may hold for mainline, so that it may be worth looking into also from that perspective. These middle-/back-end bugs are just so much nastier than my favorite front-end ones... W.
Put into "Confirmed" state.
Adjust milestone
Same thing happened to me, on a Intel Centrino, running Mandrake Linux 9.2, I thought it was my linux distribution not my processor.
(In reply to comment #13) I can reproduce this error on gcc 3.3.1 , Suse 9.0 (rpm is gcc-3.3.1-24). I get cvfundam.cpp: In function `int icvCubicV(double, double, double, double*)': cvfundam.cpp:2187: internal compiler error: in emit_move_insn_1, at expr.c:3491
*** Bug 15008 has been marked as a duplicate of this bug. ***
Some still from the gdb: (gdb) p debug_rtx(y) (const_int 1431655765 [0x55555555]) $2 = void (gdb) p debug_rtx(x) (const_int 1431655765 [0x55555555]) $3 = void Here is the backtrace: #0 0x4202bb8a in exit () from /lib/i686/libc.so.6 #1 0x08101a40 in internal_error (msgid=0xbffead10 "??4\b\f????\222I\b\033") at ../../gcc/ diagnostic.c:1211 #2 0x08101e7f in fancy_abort (file=0x83 <Address 0x83 out of bounds>, line=1108532352, function=0x83 <Address 0x83 out of bounds>) at ../../gcc/diagnostic.c:1376 #3 0x0812cd76 in emit_move_insn_1 (x=0x400a7be8, y=0x400a7be8) at ../../gcc/expr.c:3483 #4 0x0812c632 in emit_move_insn (x=0x400a7be8, y=0x400a7be8) at ../../gcc/expr.c:3208 #5 0x082969d5 in ix86_split_long_move (operands=0x846afa0) at ../../gcc/config/i386/i386.c:10145 #6 0x08196af9 in gen_split_867 (operands=0x83) at insn-emit.c:7656 #7 0x08117434 in try_split (pat=0x4009e534, trial=0x4009c2c0, last=1) at ../../gcc/emit-rtl.c:3263 #8 0x0822dab7 in split_insn (insn=0x4009c2c0) at ../../gcc/recog.c:2768 #9 0x0822dc8f in split_all_insns (upd_life=0) at ../../gcc/recog.c:2849 #10 0x0826f0cb in rest_of_compilation (decl=0x4008b7e0) at ../../gcc/toplev.c:3372 #11 0x080bb78d in genrtl_finish_function (fn=0x4008b7e0) at ../../gcc/cp/semantics.c:2589 #12 0x080bb4b7 in expand_body (fn=0x4008b7e0) at ../../gcc/cp/semantics.c:2412 #13 0x080890d9 in finish_file () at ../../gcc/cp/decl2.c:2958 #14 0x08093af3 in yyparse () at parse.y:489 #15 0x080d6899 in c_common_parse_file (set_yydebug=131) at ../../gcc/c-lex.c:159 #16 0x0826df9a in compile_file () at ../../gcc/toplev.c:2130 #17 0x08273295 in do_compile () at ../../gcc/toplev.c:5407 #18 0x0827333d in toplev_main (argc=131, argv=0xbffebc64) at ../../gcc/toplev.c:5437 #19 0x080dc7db in main (argc=131, argv=0x83) at ../../gcc/main.c:35 So this is a dup of bug 13472 which is fixed in 3.3.4. *** This bug has been marked as a duplicate of 13472 ***