URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr40446.C] - Rev 308
Go to most recent revision | Compare with Previous | Blame | View Log
// PR middle-end/40446
// { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-options "-O1 -msse2" }
// { dg-require-effective-target sse2 }
// { dg-require-effective-target sse2_runtime }
#include <emmintrin.h>
extern "C" void abort ();
struct S
{
S (double r, double i) { __real__ s = r; __imag__ s = i; }
__complex__ double s;
};
__m128d
foo ()
{
S c (0, 1);
return _mm_load_pd ((double *) &c);
}
static void
__attribute__((noinline))
sse2_test ()
{
union { __m128d vec; double val[2]; } u;
u.vec = foo ();
if (u.val[0] != 0 || u.val[1] != 1)
abort ();
}
int
main ()
{
sse2_test ();
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log