I get an internal compiler error when compiling without optimizations on the following code:
///////////////////////////////////////////////////////// #include <emmintrin.h> int buggy(double val1, double val2){ __m128d t1 = _mm_load_sd( &val1 ); __m128d t2 = _mm_load_sd( &val2 ); __m128d r = _mm_cmpgt_sd(t1, t2); return _mm_cvtsd_si32(r); } int main(int argc, char ** argv){ return buggy(3.0, 3.8); } ///////////////////////////////////////////////////// The command used is: gcc -c buggy.c -o buggy.o and the exact error text is: /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include/emmintrin.h: In function `_mm_cmpgt_sd': /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/include/emmintrin.h:396: internal compiler error: in instantiate_virtual_regs_lossage, at function.c:3781 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. Preprocessed source stored into /tmp/ccSdZXLX.out file, please attach this to your bugreport. Interestingly, adding an optimization of -O1 and up eliminates this error. I experience the same problem with 3.4.3. Some system info: System uname: 2.6.12-gentoo-r6 x86_64 Intel(R) Xeon(TM) CPU 2.80GHz Gentoo Base System version 1.6.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 -- Summary: ICE in instantiate_virtual_regs_lossage on x86-64 EM64T system Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rstancha at cse dot wustl dot edu GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25583