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