PR testsuite/86649
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr19476-6.C
blobf6b06c93c1428a441ebb2dd020581dd22d35f8e7
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */
3 /* { dg-skip-if "" keeps_null_pointer_checks } */
5 // See pr19476-7.C for a version without including <new>.
6 #include <new>
8 int f(){
9   return 33 + (0 == new(std::nothrow) int);
11 int g(){
12   return 42 + (0 == new int[50]);
15 /* { dg-final { scan-tree-dump     "return 42" "evrp" } } */
16 /* { dg-final { scan-tree-dump-not "return 33" "evrp" } } */