1 /* Test for #prama target macros. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target arm_thumb1_ok } */
4 /* { dg-require-effective-target arm_arm_ok } */
5
6 #pragma GCC target ("thumb")
7
8 #ifndef __thumb__
9 #error "__thumb__ is not defined"
10 #endif
11
12 #ifdef __thumb2__
13 #ifndef __ARM_32BIT_STATE
14 #error "__ARM_32BIT_STATE is not defined"
15 #endif
16 #else /* thumb1 */
17 #ifdef __ARM_32BIT_STATE
18 #error "__ARM_32BIT_STATE is defined"
19 #endif
20 #endif /* thumb1 */
21
22 #pragma GCC target ("arm")
23
24 #ifdef __thumb__
25 #error "__thumb__ is defined"
26 #endif
27
28 #if defined (__thumb2__) || defined (__thumb1__)
29 #error "thumb is defined"
30 #endif
31
32 #ifndef __ARM_32BIT_STATE
33 #error "__ARM_32BIT_STATE is not defined"
34 #endif
35
36 #pragma GCC reset_options