Code that compiled and executed without problem using previous versions of gcc, up to gcc-4.2.3, now crashes with an "Ilegal Instruction" message. An example of such code is given in the following short program.
double table[128]; int main() { int i; for(i = 0; i < 128; i++) table[i] = (i * i) / 127.0; return 0; } Compiling this code with gcc-4.3.0 using CFLAGS='-m64 -O3 -pipe -march=core2 -mfpmath=sse -msse4.1 -m128bit-long-double -ffast-math -Wall' will produce a program that immediately halts with an "Illegal Instruction" message. Previous versions of gcc using the same optimization did not cause this to happen. The compiler produces no output or warnings. If the CFLAGS variable includes "-O2" instead of "-O3" the problem disappears. The above code will compile and execute without crashing and producing the "Illegal Instruction" message. The system is Gnu/Linux with Intel Core 2 (x86_64-unknown-linux-gnu). Here is the output of gcc -v: Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/usr --enable-shared --enable-threads --enable-threads=posix --disable-nls --enable-languages=c,c++,fortran --disable-multilib --enable-decimal-float --with-long-double-128 Thread model: posix gcc version 4.3.0 (GCC) Andrew Kalten -- Summary: GCC-4.3.0 Optimized Code Fails With "Illegal Instruction" Message Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: akalten at comcast dot net GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36105