Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/pr103083-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-ipa-bit-cp -fdump-tree-optimized" } */
3
4 struct b {int b;};
5 struct a {int a; struct b b;};
6
7 void remove_any_mention (void);
8
9 __attribute__ ((noinline))
10 static void test2 (struct b *b)
11 {
12 if (b)
13 remove_any_mention ();
14 }
15
16 __attribute__ ((noinline))
17 static void
18 test (struct a *a)
19 {
20 test2(a? &a->b : 0);
21 }
22
23 int
24 foo()
25 {
26 test(0);
27 return 0;
28 }
29
30 /* { dg-final { scan-tree-dump-not "remove_any_mention" "optimized" } } */