Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr35045.c
blob9cf649393eda8a20b87c2778cd55a9c6cc4608ac
1 /* { dg-do run } */
2 /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ia32 && { ! nonpic } } } } */
3 /* { dg-skip-if "Not enough registers" { "pdp11-*-*" } } */
4 /* { dg-options "-O2 -fgcse-after-reload" } */
6 extern void abort (void);
8 __attribute__((noinline)) __complex__ float
9 give_neg1 (void)
11 __complex__ float res;
12 __real__ res = -1.0;
13 __imag__ res = 1.0;
14 return res;
17 __attribute__((noinline)) __complex__ float
18 mycacoshf (__complex__ float x)
20 __complex__ float res;
21 res = give_neg1 ();
23 /* We have to use the positive branch. */
24 if (__real__ res < 0.0)
26 unsigned a,b,c,d,e,f;
27 res = -res;
28 asm __volatile__ ("" : "=r" (a), "=r" (b), "=r" (c), "=r" (d), "=r" (e), "=r" (f));
30 return res;
33 int main()
35 __complex__ float res = mycacoshf(1.0);
36 if (__imag__ res >= 0.0)
37 abort();
38 return 0;