c++: Fix tree_contains_struct for TRAIT_EXPR
[official-gcc.git] / gcc / testsuite / g++.dg / opt / nothrow1.C
bloba2215abc249c826da6ae803e832f38098de4533b
1 // Test that the nothrow optimization works properly.
2 // { dg-do compile }
3 // { dg-options "-O -fdump-tree-optimized" }
5 extern void blah() throw();
7 int i, j, k;
9 int main()
11   try
12     {
13       ++i;
14       blah();
15       ++j;
16     }
17   catch (...)
18     {
19       return -42;
20     }
23 // The catch block should be optimized away.
24 // { dg-final { scan-tree-dump-times "-42" 0 "optimized" } }