Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr124868.c

raw
1 /* { dg-do run } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" } } */
3 /* { dg-additional-options "-fisolate-erroneous-paths-dereference" } */
4
5 int a;
6 static void __attribute__((noipa)) c(int b) {}
7 static int * __attribute__((noipa))
8 d()
9 {
10 int g = 0, *h = &g;
11 if (a)
12 {
13 int **i = &h;
14 *i = 0;
15 }
16 c(*h);
17 return h; /* { dg-warning "address of local variable" } */
18 }
19 int
20 main()
21 {
22 d();
23 return 0;
24 }