]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/complex-5.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / complex-5.c
CommitLineData
7b7e6ecd
EB
1/* PR middle-end/33088 */
2/* Origin: Joseph S. Myers <jsm28@gcc.gnu.org> */
3
9275f73a 4/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
7b7e6ecd
EB
5/* { dg-options "-std=c99 -O -ffloat-store -lm" } */
6
7#include <fenv.h>
8#include <stdlib.h>
9
10volatile int x[1024];
11
12void __attribute__((noinline))
13fill_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
23volatile _Complex double vc;
24
25void __attribute__((noinline))
26use_complex (_Complex double c)
27{
28 vc = c;
29}
30
31double 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
36void __attribute__((noinline))
37use_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
46int
47main (void)
48{
49 fill_stack ();
50 feclearexcept (FE_INVALID);
51 use_stack ();
52 if (fetestexcept (FE_INVALID))
53 abort ();
54 exit (0);
55}