OSDN Git Service

Backported from mainline
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / 20030811-1.c
1 /* Origin: PR target/11535 from H. J. Lu <hjl@lucon.org> */
2
3 void vararg (int i, ...)
4 {
5   (void) i;
6 }
7
8 int i0[0], i1;
9
10 void test1 (void)
11 {
12   int a = (int) (long long) __builtin_return_address (0);
13   vararg (0, a);
14 }
15
16 void test2 (void)
17 {
18   i0[0] = (int) (long long) __builtin_return_address (0);
19 }
20
21 void test3 (void)
22 {
23   i1 = (int) (long long) __builtin_return_address (0);
24 }
25
26 void test4 (void)
27 {
28   volatile long long a = (long long) __builtin_return_address (0);
29   i0[0] = (int) a;
30 }
31
32 int main (void)
33 {
34   return 0;
35 }