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/] [complex-5.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR middle-end/33088 */
2
/* Origin: Joseph S. Myers <jsm28@gcc.gnu.org> */
3
 
4
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
5
/* { dg-options "-std=c99 -O -ffloat-store -lm" } */
6
 
7
#include <fenv.h>
8
#include <stdlib.h>
9
 
10
volatile int x[1024];
11
 
12
void __attribute__((noinline))
13
fill_stack (void)
14
{
15
  volatile int y[1024];
16
  int i;
17
  for (i = 0; i < 1024; i++)
18
    y[i] = 0x7ff00000;
19
  for (i = 0; i < 1024; i++)
20
    x[i] = y[i];
21
}
22
 
23
volatile _Complex double vc;
24
 
25
void __attribute__((noinline))
26
use_complex (_Complex double c)
27
{
28
  vc = c;
29
}
30
 
31
double t0, t1, t2, t3;
32
 
33
#define USE_COMPLEX(X, R, C) \
34
  do { __real__ X = R; __imag__ X = C; use_complex (X); } while (0)
35
 
36
void __attribute__((noinline))
37
use_stack (void)
38
{
39
  _Complex double a, b, c, d;
40
  USE_COMPLEX (a, t0, t1);
41
  USE_COMPLEX (b, t1, t2);
42
  USE_COMPLEX (c, t2, t3);
43
  USE_COMPLEX (d, t3, t0);
44
}
45
 
46
int
47
main (void)
48
{
49
  fill_stack ();
50
  feclearexcept (FE_INVALID);
51
  use_stack ();
52
  if (fetestexcept (FE_INVALID))
53
    abort ();
54
  exit (0);
55
}

powered by: WebSVN 2.1.0

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