1f08c3bdfSopenharmony_ci#define __user	__attribute__((address_space(1)))
2f08c3bdfSopenharmony_ci#define NULL	((void*)0)
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ciint ret_type(void);
5f08c3bdfSopenharmony_civoid ret_type(void) { }				/* check-should-fail */
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ciint ret_const(void);
9f08c3bdfSopenharmony_ciint const ret_const(void) { return 0; }		/* check-should-fail */
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_civoid *ret_as(void);
13f08c3bdfSopenharmony_civoid __user *ret_as(void) { return NULL; }	/* check-should-fail */
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_civoid *ret_mod(void);
17f08c3bdfSopenharmony_civoid const *ret_mod(void) { return NULL; }	/* check-should-fail */
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci
20f08c3bdfSopenharmony_civoid arg_type(int a);
21f08c3bdfSopenharmony_civoid arg_type(void *a) { }			/* check-should-fail */
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_civoid arg_const(int a);
25f08c3bdfSopenharmony_civoid arg_const(const int a) { }			/* OK */
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_civoid arg_as(void *a);
29f08c3bdfSopenharmony_civoid arg_as(void __user *a) { }			/* check-should-fail */
30f08c3bdfSopenharmony_ci
31f08c3bdfSopenharmony_ci
32f08c3bdfSopenharmony_civoid arg_mod(void *);
33f08c3bdfSopenharmony_civoid arg_mod(void const *a) { }			/* check-should-fail */
34f08c3bdfSopenharmony_ci
35f08c3bdfSopenharmony_ci
36f08c3bdfSopenharmony_civoid arg_more_arg(int a);
37f08c3bdfSopenharmony_civoid arg_more_arg(int a, int b) { }		/* check-should-fail */
38f08c3bdfSopenharmony_ci
39f08c3bdfSopenharmony_ci
40f08c3bdfSopenharmony_civoid arg_less_arg(int a, int b);
41f08c3bdfSopenharmony_civoid arg_less_arg(int a) { }			/* check-should-fail */
42f08c3bdfSopenharmony_ci
43f08c3bdfSopenharmony_ci
44f08c3bdfSopenharmony_civoid arg_vararg(int a);
45f08c3bdfSopenharmony_civoid arg_vararg(int a, ...) { }			/* check-should-fail */
46f08c3bdfSopenharmony_ci
47f08c3bdfSopenharmony_ci/*
48f08c3bdfSopenharmony_ci * check-name: function-redecl
49f08c3bdfSopenharmony_ci *
50f08c3bdfSopenharmony_ci * check-error-start
51f08c3bdfSopenharmony_cifunction-redecl.c:5:6: error: symbol 'ret_type' redeclared with different type (different base types):
52f08c3bdfSopenharmony_cifunction-redecl.c:5:6:    void extern [addressable] [toplevel] ret_type( ... )
53f08c3bdfSopenharmony_cifunction-redecl.c:4:5: note: previously declared as:
54f08c3bdfSopenharmony_cifunction-redecl.c:4:5:    int extern [addressable] [signed] [toplevel] ret_type( ... )
55f08c3bdfSopenharmony_cifunction-redecl.c:9:11: error: symbol 'ret_const' redeclared with different type (different modifiers):
56f08c3bdfSopenharmony_cifunction-redecl.c:9:11:    int extern const [addressable] [signed] [toplevel] ret_const( ... )
57f08c3bdfSopenharmony_cifunction-redecl.c:8:5: note: previously declared as:
58f08c3bdfSopenharmony_cifunction-redecl.c:8:5:    int extern [addressable] [signed] [toplevel] ret_const( ... )
59f08c3bdfSopenharmony_cifunction-redecl.c:13:13: error: symbol 'ret_as' redeclared with different type (different address spaces):
60f08c3bdfSopenharmony_cifunction-redecl.c:13:13:    void <asn:1> *extern [addressable] [toplevel] ret_as( ... )
61f08c3bdfSopenharmony_cifunction-redecl.c:12:6: note: previously declared as:
62f08c3bdfSopenharmony_cifunction-redecl.c:12:6:    void *extern [addressable] [toplevel] ret_as( ... )
63f08c3bdfSopenharmony_cifunction-redecl.c:17:12: error: symbol 'ret_mod' redeclared with different type (different modifiers):
64f08c3bdfSopenharmony_cifunction-redecl.c:17:12:    void const *extern [addressable] [toplevel] ret_mod( ... )
65f08c3bdfSopenharmony_cifunction-redecl.c:16:6: note: previously declared as:
66f08c3bdfSopenharmony_cifunction-redecl.c:16:6:    void *extern [addressable] [toplevel] ret_mod( ... )
67f08c3bdfSopenharmony_cifunction-redecl.c:21:6: error: symbol 'arg_type' redeclared with different type (incompatible argument 1 (different base types)):
68f08c3bdfSopenharmony_cifunction-redecl.c:21:6:    void extern [addressable] [toplevel] arg_type( ... )
69f08c3bdfSopenharmony_cifunction-redecl.c:20:6: note: previously declared as:
70f08c3bdfSopenharmony_cifunction-redecl.c:20:6:    void extern [addressable] [toplevel] arg_type( ... )
71f08c3bdfSopenharmony_cifunction-redecl.c:29:6: error: symbol 'arg_as' redeclared with different type (incompatible argument 1 (different address spaces)):
72f08c3bdfSopenharmony_cifunction-redecl.c:29:6:    void extern [addressable] [toplevel] arg_as( ... )
73f08c3bdfSopenharmony_cifunction-redecl.c:28:6: note: previously declared as:
74f08c3bdfSopenharmony_cifunction-redecl.c:28:6:    void extern [addressable] [toplevel] arg_as( ... )
75f08c3bdfSopenharmony_cifunction-redecl.c:33:6: error: symbol 'arg_mod' redeclared with different type (incompatible argument 1 (different modifiers)):
76f08c3bdfSopenharmony_cifunction-redecl.c:33:6:    void extern [addressable] [toplevel] arg_mod( ... )
77f08c3bdfSopenharmony_cifunction-redecl.c:32:6: note: previously declared as:
78f08c3bdfSopenharmony_cifunction-redecl.c:32:6:    void extern [addressable] [toplevel] arg_mod( ... )
79f08c3bdfSopenharmony_cifunction-redecl.c:37:6: error: symbol 'arg_more_arg' redeclared with different type (different argument counts):
80f08c3bdfSopenharmony_cifunction-redecl.c:37:6:    void extern [addressable] [toplevel] arg_more_arg( ... )
81f08c3bdfSopenharmony_cifunction-redecl.c:36:6: note: previously declared as:
82f08c3bdfSopenharmony_cifunction-redecl.c:36:6:    void extern [addressable] [toplevel] arg_more_arg( ... )
83f08c3bdfSopenharmony_cifunction-redecl.c:41:6: error: symbol 'arg_less_arg' redeclared with different type (different argument counts):
84f08c3bdfSopenharmony_cifunction-redecl.c:41:6:    void extern [addressable] [toplevel] arg_less_arg( ... )
85f08c3bdfSopenharmony_cifunction-redecl.c:40:6: note: previously declared as:
86f08c3bdfSopenharmony_cifunction-redecl.c:40:6:    void extern [addressable] [toplevel] arg_less_arg( ... )
87f08c3bdfSopenharmony_cifunction-redecl.c:45:6: error: symbol 'arg_vararg' redeclared with different type (incompatible variadic arguments):
88f08c3bdfSopenharmony_cifunction-redecl.c:45:6:    void extern [addressable] [toplevel] arg_vararg( ... )
89f08c3bdfSopenharmony_cifunction-redecl.c:44:6: note: previously declared as:
90f08c3bdfSopenharmony_cifunction-redecl.c:44:6:    void extern [addressable] [toplevel] arg_vararg( ... )
91f08c3bdfSopenharmony_ci * check-error-end
92f08c3bdfSopenharmony_ci */
93