Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/bad-error4.C

raw
1 // { dg-do assemble }
2 // GROUPS passed bad-errors
3 #include <stddef.h>
4
5 void * operator new(size_t, int *);
6 void * operator new(size_t, void *);
7
8 int *x = 0;
9 int foo(){
10 new (x) int *;
11 new (&x) int *;
12 new (x) int *; // This is identical to line 8 !!!
13 return 1;
14 }