Bug 12271 - [3.3.3 regression] Compilation of OpenCV (Open Computer VIsion) with error message: in emit_move_insn_1, at expr.c:3510
Summary: [3.3.3 regression] Compilation of OpenCV (Open Computer VIsion) with error me...
Status: RESOLVED DUPLICATE of bug 13472
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3.2
: P2 normal
Target Milestone: 3.3.4
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 15008 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-14 01:41 UTC by duconnot
Modified: 2004-10-07 23:46 UTC (History)
7 users (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work: 3.4.0 4.0.0 3.3.1
Known to fail: 3.3.3
Last reconfirmed: 2004-02-04 01:49:55


Attachments
preprocessed file (60.72 KB, text/plain)
2003-09-14 17:25 UTC, duconnot
Details
Preprocessed cvfundam.cpp -> cvfundam.ii (60.21 KB, text/plain)
2004-02-04 00:15 UTC, Erich Buri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description duconnot 2003-09-14 01:41:11 UTC
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
Comment 1 Andrew Pinski 2003-09-14 02:25:02 UTC
Read http://gcc.gnu.org/bugs.html and provide the preprocessed source file.
Comment 2 duconnot 2003-09-14 17:25:58 UTC
Created attachment 4758 [details]
preprocessed file
Comment 3 dank 2003-09-15 17:55:53 UTC
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.
Comment 4 Wolfgang Bangerth 2003-09-15 18:21:41 UTC
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.
Comment 5 duconnot 2003-09-19 21:58:50 UTC
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. 
Comment 6 Andrew Pinski 2003-09-19 22:00:40 UTC
Closing as there is no way to reproduce this bug.
Comment 7 Erich Buri 2004-02-04 00:15:30 UTC
Created attachment 5670 [details]
Preprocessed cvfundam.cpp -> cvfundam.ii

I could not compile OpenCV either, this is the preprocessed cvfundam.cpp
Comment 8 Erich Buri 2004-02-04 00:26:06 UTC
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.


Comment 9 Wolfgang Bangerth 2004-02-04 00:33:19 UTC
I _can_ confirm this with the last attachment. I'm working on a reduced 
testcase. 
 
W. 
Comment 10 Wolfgang Bangerth 2004-02-04 00:45:37 UTC
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. 
Comment 11 Wolfgang Bangerth 2004-02-04 00:46:42 UTC
As mentioned, this is fixed. 
 
W. 
Comment 12 Giovanni Bajo 2004-02-04 01:43:12 UTC
Wolfgang, isn't this a 3.3.3 regression?
Comment 13 Wolfgang Bangerth 2004-02-04 01:49:19 UTC
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. 
Comment 14 Wolfgang Bangerth 2004-02-04 01:49:55 UTC
Put into "Confirmed" state. 
Comment 15 Gabriel Dos Reis 2004-02-15 12:35:27 UTC
Adjust milestone
Comment 16 Luis Pedro Perez 2004-03-18 05:52:12 UTC
Same thing happened to me, on a Intel Centrino, running Mandrake Linux 9.2, I
thought it was my linux distribution not my processor.
Comment 17 Kjell Morgenstern 2004-03-24 17:41:28 UTC
 (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 
Comment 18 Andrew Pinski 2004-04-18 21:42:12 UTC
*** Bug 15008 has been marked as a duplicate of this bug. ***
Comment 19 Andrew Pinski 2004-04-18 21:50:27 UTC
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 ***