This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
- From: "ahu at ds9a dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Apr 2004 14:24:19 -0000
- Subject: [Bug optimization/15101] New: Trying to use diouble precision SIMD vector causes: internal compiler error: in extract_bit_field, at expmed.c:1152
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The documentation claims that gcc can write out double precision floating point
arithmetic if the hardware can't do it SIMD.
When compiling with -O3, this results in the ICE above, when compiling without
-O, it produces bogus results.
Compiled with:
gcc -Wall -ggdb -march=pentium3 -msse simd.c -o simd -O3
Code:
typedef int v4df __attribute__ ((mode(V4DF)));
typedef int v4sf __attribute__ ((mode(V4SF)));
union dvector4
{
v4df vect;
double e[4];
};
union fvector4
{
v4sf vect;
float e[4];
};
int main()
{
int n;
union dvector4 a, b;
a.e[0]=0;
a.e[1]=10;
a.e[2]=20;
a.e[3]=30;
b.e[0]=0;
b.e[1]=0;
b.e[2]=0;
b.e[3]=0;
for(n=0;n<1000;++n) {
b.vect = b.vect + a.vect;
/*
b.e[0] = b.e[0] + a.e[0];
b.e[1] = b.e[1] + a.e[1];
b.e[2] = b.e[2] + a.e[2];
b.e[3] = b.e[3] + a.e[3];
*/
}
// printf("%f, %f, %f, %f\n", c.e[0], c.e[1], c.e[2], c.e[3]);
return 0;
}
--
Summary: Trying to use diouble precision SIMD vector causes:
internal compiler error: in extract_bit_field, at
expmed.c:1152
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ahu at ds9a dot nl
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15101