| 1 |
/* { dg-do preprocess { target { i?86-*-* x86_64-*-* } } } */ |
| 2 |
/* { dg-options "-mno-avx" } */ |
| 3 |
|
| 4 |
#ifdef __AVX__ |
| 5 |
#error "__AVX__ should not be defined #1" |
| 6 |
#endif |
| 7 |
|
| 8 |
#pragma GCC target("avx") |
| 9 |
#ifndef __AVX__ |
| 10 |
#error "__AVX__ should be defined #1" |
| 11 |
#endif |
| 12 |
|
| 13 |
#pragma GCC reset_options |
| 14 |
#ifdef __AVX__ |
| 15 |
#error "__AVX__ should not be defined #2" |
| 16 |
#endif |
| 17 |
|
| 18 |
#pragma GCC push_options |
| 19 |
#pragma GCC target("avx") |
| 20 |
#ifndef __AVX__ |
| 21 |
#error "__AVX__ should be defined #2" |
| 22 |
#endif |
| 23 |
|
| 24 |
#pragma GCC pop_options |
| 25 |
#ifdef __AVX__ |
| 26 |
#error "__AVX__ should not be defined #3" |
| 27 |
#endif |