OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr40446.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR middle-end/40446
2
// { dg-do run { target i?86-*-* x86_64-*-* } }
3
// { dg-options "-O1 -msse2" }
4
// { dg-require-effective-target sse2_runtime }
5
 
6
#include 
7
 
8
extern "C" void abort ();
9
 
10
struct S
11
{
12
  S (double r, double i) { __real__ s = r; __imag__ s = i; }
13
  __complex__ double s;
14
};
15
 
16
__m128d
17
foo ()
18
{
19
  S c (0, 1);
20
  return _mm_load_pd ((double *) &c);
21
}
22
 
23
static void
24
__attribute__((noinline))
25
sse2_test ()
26
{
27
  union { __m128d vec; double val[2]; } u;
28
  u.vec = foo ();
29
  if (u.val[0] != 0 || u.val[1] != 1)
30
    abort ();
31
}
32
 
33
int
34
main ()
35
{
36
  sse2_test ();
37
  return 0;
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.