aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C
blob: cbdad90d16b4e6d577ffddc37ade9439ee4d96c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-ccp1" } */

// See pr19476-5.C for a version without including <new>.
#include <new>

int f(){
  return 33 + (0 == new(std::nothrow) int);
}
int g(){
  return 42 + (0 == new int[50]);
}

/* { dg-final { scan-tree-dump     "return 42" "ccp1" } } */
/* { dg-final { scan-tree-dump-not "return 33" "ccp1" } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */