]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr35045.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr35045.c
CommitLineData
6994f254 1/* { dg-do run } */
dbbb299a 2/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ia32 && { ! nonpic } } } { "*" } { "" } } */
6994f254
MM
3/* { dg-options "-O2 -fgcse-after-reload" } */
4
5extern void abort (void);
6
7__attribute__((noinline)) __complex__ float
8give_neg1 (void)
9{
10 __complex__ float res;
11 __real__ res = -1.0;
12 __imag__ res = 1.0;
13 return res;
14}
15
16__attribute__((noinline)) __complex__ float
17mycacoshf (__complex__ float x)
18{
19 __complex__ float res;
20 res = give_neg1 ();
21
22 /* We have to use the positive branch. */
23 if (__real__ res < 0.0)
24 {
25 unsigned a,b,c,d,e,f;
26 res = -res;
27 asm __volatile__ ("" : "=r" (a), "=r" (b), "=r" (c), "=r" (d), "=r" (e), "=r" (f));
28 }
29 return res;
30}
31
32int main()
33{
34 __complex__ float res = mycacoshf(1.0);
35 if (__imag__ res >= 0.0)
36 abort();
37 return 0;
38}