re PR c++/71973 (c++ handles built-in functions inconsistently)
[gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr41428.C
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1-details" } */
3
4 extern "C" void abort (void);
5 inline void *operator new (__SIZE_TYPE__, void *__p) throw () { return __p; }
6
7 int foo(void)
8 {
9 float f = 0;
10 int *i = new (&f) int (1);
11 return *(int *)&f;
12 }
13
14 /* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" } } */