2 // { dg-options "-Wframe-address" }
4 static void* const fa[] = {
5 __builtin_frame_address (0),
6 __builtin_frame_address (1), // { dg-warning "builtin_frame_address" }
7 __builtin_frame_address (2), // { dg-warning "builtin_frame_address" }
8 __builtin_frame_address (3), // { dg-warning "builtin_frame_address" }
9 __builtin_frame_address (4) // { dg-warning "builtin_frame_address" }
13 static void* const ra[] = {
14 __builtin_return_address (0),
15 __builtin_return_address (1), // { dg-warning "builtin_return_address" }
16 __builtin_return_address (2), // { dg-warning "builtin_return_address" }
17 __builtin_return_address (3), // { dg-warning "builtin_return_address" }
18 __builtin_return_address (4) // { dg-warning "builtin_return_address" }
22 void* __attribute__ ((noclone, noinline))
23 test_builtin_frame_address (unsigned i)
26 __builtin_frame_address (0),
27 __builtin_frame_address (1), // { dg-warning "builtin_frame_address" }
28 __builtin_frame_address (2), // { dg-warning "builtin_frame_address" }
29 __builtin_frame_address (3), // { dg-warning "builtin_frame_address" }
30 __builtin_frame_address (4) // { dg-warning "builtin_frame_address" }
37 void* __attribute__ ((noclone, noinline))
38 test_builtin_return_address (unsigned i)
41 __builtin_return_address (0),
42 __builtin_return_address (1), // { dg-warning "builtin_return_address" }
43 __builtin_return_address (2), // { dg-warning "builtin_return_address" }
44 __builtin_return_address (3), // { dg-warning "builtin_return_address" }
45 __builtin_return_address (4) // { dg-warning "builtin_return_address" }
53 test_builtin_frame_address (0);
55 test_builtin_return_address (0);
58 __builtin_frame_address (0),
59 __builtin_frame_address (1), // { dg-warning "builtin_frame_address" }
60 __builtin_frame_address (2), // { dg-warning "builtin_frame_address" }
61 __builtin_frame_address (3), // { dg-warning "builtin_frame_address" }
62 __builtin_frame_address (4), // { dg-warning "builtin_frame_address" }
64 __builtin_return_address (0),
65 __builtin_return_address (1), // { dg-warning "builtin_return_address" }
66 __builtin_return_address (2), // { dg-warning "builtin_return_address" }
67 __builtin_return_address (3), // { dg-warning "builtin_return_address" }
68 __builtin_return_address (4) // { dg-warning "builtin_return_address" }