Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr25718-1.c
blob8333a33a54d67656cd6bca85117c3a49a03fbbee
1 /* { dg-do run } */
2 /* PR 25718: invalid constant operand to the "bound" insn; error at
3 assembly time. We'll make sure the code is correct to: run a few
4 example values. */
6 extern void exit (int);
7 extern void abort (void);
8 unsigned __attribute__ ((__noinline__)) foo(unsigned a)
10 unsigned l;
11 l = (a >= (~0u - 512) ? (~0u - 512) : a);
12 return l;
15 int
16 main (void)
18 if (foo ((unsigned) -512) != (unsigned) -513
19 || foo ((unsigned) -514) != (unsigned) -514
20 || foo ((unsigned) -513) != (unsigned) -513
21 || foo ((unsigned) -1) != (unsigned) -513
22 || foo (513) != 513
23 || foo (0) != 0)
24 abort ();
26 exit (0);