Debian Codegraph @

gcc/testsuite/g++.dg/ipa/nothrow-1.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fnon-call-exceptions -fdump-tree-optimized -fno-ipa-vrp" } */
3 int *ptr;
4 static int barvar;
5
6 /* We can not detect A to be const because it may be interposed by unoptimized
7 body. */
8 inline
9 __attribute__ ((noinline))
10 int a(void)
11 {
12 return *ptr == *ptr;
13 }
14 int main()
15 {
16 int aa;
17 ptr = &barvar;
18 try {
19 aa=!a();
20 } catch (...)
21 {
22 return 1;
23 }
24 ptr = 0;
25 return aa;
26 }
27 /* { dg-final { scan-tree-dump "__cxa_begin_catch" "optimized" } } */