Merge with trank @ 137446
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-overflow-1.c
blobbd4d25a73ed23a227a4c0c46351e9970b49e66b7
1 /* { dg-compile } */
2 /* { dg-skip-if "consts are shorts, not longs" { "m32c-*-*" "avr-*-*" } { "*" } { "" } } */
3 /* { dg-skip-if "No Inf support" { spu-*-* } } */
4 /* { dg-options "-O -ftrapping-math" } */
6 /* There should be exactly 2 +Inf in the assembly file. */
8 float f1 = __FLT_MAX__ + __FLT_MAX__;
10 float foo1(void)
12 return __FLT_MAX__ + __FLT_MAX__;
15 float f2 = 1.0f/0.0f;
17 float foo2(void)
19 return 1.0f/0.0f;
22 /* { dg-final { scan-assembler-times "2139095040" 2 { target { ! mmix-*-* } } } } */
23 /* { dg-final { scan-assembler-times "#7f800000" 2 { target mmix-*-* } } } */