1 #define	__user		__attribute__((address_space(1)))
2 
3 struct s {
4 	int i;
5 } __user;
6 
7 
8 extern void use0(void *);
9 extern void use1(void __user *);
10 
main(void)11 void main(void)
12 {
13 	struct s s;
14 	int i;
15 
16 	use0(&s);	// KO
17 	use0(&i);	// OK
18 	use1(&s);	// OK
19 	use1(&i);	// KO
20 }
21 
22 /*
23  * check-name: type-attribute-as
24  *
25  * check-error-start
26 type-attribute-as.c:16:15: warning: incorrect type in argument 1 (different address spaces)
27 type-attribute-as.c:16:15:    expected void *<noident>
28 type-attribute-as.c:16:15:    got struct s <asn:1>*<noident>
29 type-attribute-as.c:19:15: warning: incorrect type in argument 1 (different address spaces)
30 type-attribute-as.c:19:15:    expected void <asn:1>*<noident>
31 type-attribute-as.c:19:15:    got int *<noident>
32  * check-error-end
33  */
34