gcc/testsuite/g++.dg/pr94314-2.C
raw| 1 | /* PR c++/94314. */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-options "-O2 -fdump-tree-cddce-details -fdelete-null-pointer-checks" } */ |
| 4 | |
| 5 | struct A |
| 6 | { |
| 7 | __attribute__((always_inline)) A(int x) |
| 8 | { |
| 9 | if (x == 123) |
| 10 | throw x; |
| 11 | } |
| 12 | }; |
| 13 | |
| 14 | int |
| 15 | main(int argc, char **argv) |
| 16 | { |
| 17 | A *a = new A (argc); |
| 18 | delete a; |
| 19 | |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | /* { dg-final { scan-tree-dump-times "Deleting : operator delete" 2 "cddce1"} } */ |