PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / template / new11.C
blob76f6c66997f5ba14511e4a09a6144e39eba6aa94
1 // PR c++/54984
2 // { dg-do run }
4 int n = 1;
6 void* operator new(__SIZE_TYPE__)
8   n = -1;
9   return &n;
12 template <class T>
13 struct Foo
15   Foo()
16   : x(new int)
17   {
18     if (*x != -1)
19       __builtin_abort();
20   }
22   int* x;
25 int main()
27   Foo<float> foo;