The error-producing command line is g++ -Wall -O3 -march=native -c videospeed.cc videospeed.cc: In function 'int main(int, char**)': videospeed.cc:275: internal compiler error: in expand_simple_binop, at optabs.c:1158 Adding -save-temps gives a new warning "SSE instruction set disabled, using 387 arithmetics", and the compile succeeds. Also, changing to -march=i386 or -march=i686 avoids the problem. I will attach the g++ -E output, which does trigger the error.
Created attachment 14247 [details] error-producing test case test case: rename to test.cc, and 'g++ -Wall -O3 -march=native -c test.cc'
Can you provide the -v output? This is needed if you use -march=native.
bash-2.05b$ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2.1/configure --prefix=/packages/gcc/4.2.1/any --exec-prefix=/packages/gcc/4.2.1/i386 Thread model: posix gcc version 4.2.1
-v output when compiling, that is, g++ -Wall -O3 -march=native -c videospeed.cc -v
Created attachment 14249 [details] output of 'g++ -Wall -O3 -march=native -v -c test.cc'
Confirmed. Reduced testcase that crashes on i686-pc-linux-gnu when compiled with "-msse -O" (as C or C++ code): ====================================================== typedef int v4i __attribute__((vector_size(16))); void foo(v4i* p, v4i v) { int i; for (i=0; i < 4; ++i) *p += v; } ====================================================== bug.c: In function 'foo': bug.c:8: internal compiler error: in expand_simple_binop, at optabs.c:1157 Please submit a full bug report, [etc.] The bug appeared in GCC 4.2.0 and disappeared on mainline between 2007-09-14 and 2007-10-13.
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.
4.2.4 is being released, changing milestones to 4.2.5.
Closing 4.2 branch, fixed in 4.3.