Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/tree-ssa/pr19476-6.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O2 -fdump-tree-evrp -fdelete-null-pointer-checks" } */ | |
3 /* { dg-skip-if "" keeps_null_pointer_checks } */ | |
4 | |
5 // See pr19476-7.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" "evrp" } } */ | |
16 /* { dg-final { scan-tree-dump-not "return 33" "evrp" } } */ |