1*c85f09ccSJohn Levon #define __bitwise __attribute__((bitwise))
2*c85f09ccSJohn Levon #define __force   __attribute__((force))
3*c85f09ccSJohn Levon 
4*c85f09ccSJohn Levon typedef int __bitwise apple_t;
5*c85f09ccSJohn Levon typedef int __bitwise orange_t;
6*c85f09ccSJohn Levon 
7*c85f09ccSJohn Levon enum fruit {
8*c85f09ccSJohn Levon 	A = (__force  apple_t) 0,
9*c85f09ccSJohn Levon 	B = (__force orange_t) 1,
10*c85f09ccSJohn Levon };
11*c85f09ccSJohn Levon 
12*c85f09ccSJohn Levon /*
13*c85f09ccSJohn Levon  * check-name: enum-bitwise-bad
14*c85f09ccSJohn Levon  *
15*c85f09ccSJohn Levon  * check-error-start
16*c85f09ccSJohn Levon enum-bitwise-bad.c:9:14: error: incompatible restricted type
17*c85f09ccSJohn Levon enum-bitwise-bad.c:9:14:    expected: restricted apple_t
18*c85f09ccSJohn Levon enum-bitwise-bad.c:9:14:         got: restricted orange_t
19*c85f09ccSJohn Levon  * check-error-end
20*c85f09ccSJohn Levon  */
21