Bug 25583 - [3.4 Regression] ICE in instantiate_virtual_regs_lossage on x86-64 EM64T system
Summary: [3.4 Regression] ICE in instantiate_virtual_regs_lossage on x86-64 EM64T system
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P3 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, ssemmx
Depends on: 25242
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-27 23:18 UTC by Roman stanchak
Modified: 2006-03-01 05:07 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Known to work: 3.3.3 4.0.0 4.1.0 4.2.0
Known to fail: 3.4.5
Last reconfirmed: 2005-12-27 23:44:17


Attachments
test case (169 bytes, text/plain)
2005-12-27 23:20 UTC, Roman stanchak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman stanchak 2005-12-27 23:18:29 UTC
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
Comment 1 Roman stanchak 2005-12-27 23:20:05 UTC
Created attachment 10558 [details]
test case

Minimal test case exhibiting bug on my system.
Comment 2 Andrew Pinski 2005-12-27 23:44:17 UTC
Confirmed, only a 3.4 regression, related to PR 25242.
Comment 3 Gabriel Dos Reis 2006-03-01 05:07:34 UTC
Fixed in 4.0.0 and up