Rebase.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / c99-contract-1.c
blob6023083080793f34f2ae12b0d2c8e4f0e36e2d4f
1 /* Test floating-point contraction occurs only within source language
2 expressions. */
3 /* { dg-do run } */
4 /* { dg-options "-std=c99 -pedantic-errors" } */
6 extern void abort (void);
7 extern void exit (int);
9 volatile float a = 1 + 0x1p-23f, b = 1 - 0x1p-23f, c = -1;
11 int
12 main (void)
14 float av = a, bv = b, cv = c;
15 float p = av * bv;
16 float r = p + cv;
17 if (r == 0)
18 exit (0);
19 else
20 abort ();