2 extern void exit (int);
3 extern void abort (void);
4 extern void *alloca (__SIZE_TYPE__
);
7 #define NOINLINE __attribute__((noinline))
10 void *test4a (char *);
11 void *test5a (char *);
12 void *test6a (char *);
14 void NOINLINE
*test1 (void)
17 temp
= __builtin_return_address (0);
21 void NOINLINE
*test2 (void)
25 temp
= __builtin_return_address (0);
29 void NOINLINE
*test3 (void)
32 temp
= __builtin_return_address (0);
37 void NOINLINE
*test4 (void)
39 char * save
= (char*) alloca (4);
44 void *NOINLINE
test4a (char * p
)
47 temp
= __builtin_return_address (1);
51 void NOINLINE
*test5 (void)
53 char * save
= (char*) alloca (4);
58 void NOINLINE
*test5a (char * p
)
62 temp
= __builtin_return_address (1);
66 void NOINLINE
*test6 (void)
68 char * save
= (char*) alloca (4);
73 void NOINLINE
*test6a (char * p
)
76 temp
= __builtin_return_address (1);
81 void *(*func1
[6])(void) = { test1
, test2
, test3
, test4
, test5
, test6
};
83 char * NOINLINE
call_func1 (int i
)
85 save_ret1
[i
] = func1
[i
] ();
88 static void *ret_addr
;
90 void test10a (char *);
91 void test11a (char *);
92 void test12a (char *);
94 void NOINLINE
test7 (void)
96 ret_addr
= __builtin_return_address (0);
100 void NOINLINE
test8 (void)
103 ret_addr
= __builtin_return_address (0);
107 void NOINLINE
test9 (void)
109 ret_addr
= __builtin_return_address (0);
114 void NOINLINE
test10 (void)
116 char * save
= (char*) alloca (4);
121 void NOINLINE
test10a (char * p
)
123 ret_addr
= __builtin_return_address (1);
127 void NOINLINE
test11 (void)
129 char * save
= (char*) alloca (4);
134 void NOINLINE
test11a (char * p
)
137 ret_addr
= __builtin_return_address (1);
141 void NOINLINE
test12 (void)
143 char * save
= (char*) alloca (4);
148 void NOINLINE
test12a (char * p
)
150 ret_addr
= __builtin_return_address (1);
157 char * save
= (char*) alloca (4);
162 void (*func2
[6])(void) = { test7
, test8
, test9
, test10
, test11
, test12
};
164 void NOINLINE
call_func2 (int i
)
167 save_ret2
[i
] = ret_addr
;
174 for (i
= 0; i
< 6; i
++) {
178 if (save_ret1
[0] != save_ret1
[1]
179 || save_ret1
[1] != save_ret1
[2])
181 if (save_ret1
[3] != save_ret1
[4]
182 || save_ret1
[4] != save_ret1
[5])
184 if (save_ret1
[3] && save_ret1
[0] != save_ret1
[3])
188 for (i
= 0; i
< 6; i
++) {
192 if (save_ret2
[0] != save_ret2
[1]
193 || save_ret2
[1] != save_ret2
[2])
195 if (save_ret2
[3] != save_ret2
[4]
196 || save_ret2
[4] != save_ret2
[5])
198 if (save_ret2
[3] && save_ret2
[0] != save_ret2
[3])