Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/pr118828-2.c

raw
1 /* { dg-do preprocess } */
2 /* { dg-options "-mno-lsx" } */
3
4 #ifdef __loongarch_sx
5 #error LSX should not be available here
6 #endif
7
8 #ifdef __loongarch_simd_width
9 #error simd width shuold not be available here
10 #endif
11
12 #pragma GCC push_options
13 #pragma GCC target("lsx")
14 #ifndef __loongarch_sx
15 #error LSX should be available here
16 #endif
17 #ifndef __loongarch_simd_width
18 #error simd width should be available here
19 #elif __loongarch_simd_width != 128
20 #error simd width should be 128
21 #endif
22 #pragma GCC pop_options
23
24 #ifdef __loongarch_sx
25 #error LSX should become unavailable again
26 #endif
27
28 #ifdef __loongarch_simd_width
29 #error simd width shuold become unavailable again
30 #endif