Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / alpha / sqrt.c
bloba3c8b243ae41625f2130614fc1f529090388caa7
1 /* glibc bug, https://sourceware.org/ml/libc-alpha/2017-04/msg00256.html
2 When using software completions, we have to prevent assembler to match
3 input and output operands of sqrtt/sqrtf insn. Fixed in glibc 2.26. */
4 /* { dg-do run } */
5 /* { dg-options "-O2 -fno-builtin-sqrt -mieee" } */
7 double sqrt (double);
9 static double
10 float64frombits (unsigned long b)
12 union { unsigned long __b; double __d; } u = { .__b = b };
13 return u.__d;
16 int
17 main (void)
19 double a = float64frombits (2);
21 if (sqrt (a) != 3.1434555694052576e-162)
22 __builtin_abort ();
24 return 0;