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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr39678.c] - Blame information for rev 298

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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