This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13634] New: ICE when compiling OpenCV.


When i try to compile OpenCV I get an internal compiler error. The following testcase 
triggers an ICE when compiled with: 
 
gcc -march=i686 -ffast-math -O2 -fPIC -c gcctest2.c 
------------------------------------------------------------------------------------------------- 
double pow(double ,double ); 
 
int icvCubicV( double a2, double a1, double a0, double *squares ) 
{ 
  double p, c2, ro1; 
  double x[6][3]; 
  int i; 
   
  p = a1 - a2 * a2 / 3; 
     
  for( i = 0; i < 6; i++ ) 
    squares[i] = x[i][i % 2]; 
 
  c2 = pow( ro1 , 1. / 3 ) + ( (ro1)<0 ? -1:((ro1)>0?1:0 ) )  *  p / 3.; 
 
  if( !( (ro1) < 1e-8 )) 
    { 
      x[i][1] = c2; 
    }   
} 
------------------------------------------------------------------------------------------------- 
The code might be non-sensible since I've cut out everything except what causes the 
ICE. The original file is OpenCV-0.9.5/cv/src/cvfundam.cpp. Removing any more 
options to gcc will also finish the compilation without error. 
I have tried this on both version 3.3.2 and 3.3-20040105. I get the fault: 
 
[rosbacke@cvap83 gcctest]$ gcc -march=i686 -ffast-math -O2 -fPIC -c gcctest2.c 
gcctest2.c: In function `icvCubicV': 
gcctest2.c:22: 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. 
[rosbacke@cvap83 gcctest]$ 
 
Output from gcc -v is: 
 Reading specs 
from /afs/nada.kth.se/home/cvap/rosbacke/install/redhat90/gcc33-20040105/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs 
Configured with: ../gcc-3.3-20040105/configure 
--prefix=/home/cvap/rosbacke/install/redhat90/gcc33-20040105 
Thread model: posix 
gcc version 3.3.3 20040105 (prerelease)

-- 
           Summary: ICE when compiling OpenCV.
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rosbacke at nada dot kth dot se
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13634


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]