Debian Codegraph @

gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-dom2 -fdelete-null-pointer-checks -fno-allocation-dce" } */
3 /* { dg-skip-if "" keeps_null_pointer_checks } */
4
5 // See pr19476-5.C for a version without including <new>.
6 #include <new>
7
8 int f(){
9 return 33 + (0 == new(std::nothrow) int);
10 }
11 int g(){
12 return 42 + (0 == new int[50]);
13 }
14
15 /* { dg-final { scan-tree-dump "return 42" "dom2" } } */
16 /* { dg-final { scan-tree-dump-not "return 33" "dom2" } } */