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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr39678.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* PR target/39678 */
2
/* { dg-do run } */
3
/* { dg-options "-Wno-psabi" } */
4
struct Y {};
5
struct X {
6
  struct Y y;
7
  __complex__ float val;
8
};
9
 
10
struct X __attribute__((noinline))
11
foo (float *p)
12
{
13
  struct X x;
14
  __real x.val = p[0];
15
  __imag x.val = p[1];
16
  return x;
17
}
18
extern "C" void abort (void);
19
float a[2] = { 3., -2. };
20
int main()
21
{
22
  struct X x = foo(a);
23
  if (__real x.val != 3. || __imag x.val != -2.)
24
    abort ();
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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