* gcc/final.c (final_scan_insn) [HAVE_cc0]: Handle all comparison
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / fp-compare.c
blob0d51dfd2478ed7837ab3aeb3bd1c1857a4e98598
1 /* { dg-do run } */
2 /* Check that find_scan_insn properly handles swapped FP comparisons. */
3 static double x;
4 static int exit_code;
6 void __attribute__ ((noinline))
7 check_int (int a, int b)
9 exit_code += (a != b);
12 int
13 main (void)
15 x = 0.0;
16 asm ("" : "+m" (x));
17 check_int (__builtin_isgreater (x, 1.0), 0);
18 check_int (__builtin_isgreaterequal (x, 1.0), 0);
19 check_int (__builtin_isless (x, 1.0), 1);
20 check_int (__builtin_islessequal (x, 1.0), 1);
21 check_int (__builtin_islessgreater (x, 1.0), 1);
22 return exit_code;