gcc/testsuite/gcc.dg/associative-math-2.c
raw| 1 | /* Test __ASSOCIATIVE_MATH__ is not defined with -fno-associative-math. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-fno-associative-math" } */ |
| 4 | |
| 5 | #ifdef __ASSOCIATIVE_MATH__ |
| 6 | #error "__ASSOCIATIVE_MATH__ defined" |
| 7 | #endif |
| 8 | |
| 9 | #pragma GCC optimize "-fassociative-math" |
| 10 | #ifndef __ASSOCIATIVE_MATH__ |
| 11 | #error "__ASSOCIATIVE_MATH__ not defined" |
| 12 | #endif |
| 13 | |
| 14 | #pragma GCC optimize "-fno-associative-math" |
| 15 | #ifdef __ASSOCIATIVE_MATH__ |
| 16 | #error "__ASSOCIATIVE_MATH__ defined" |
| 17 | #endif |