Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / tc1 / dr127.C
blob4dddc6d77789b7c61486510b0090a520edd49ea4
1 // { dg-do link }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR127: Ambiguity in description of matching deallocation function
5 #include <cstddef>
6 #include <new>
8 struct A 
10   // placement new, but can be called through normal new syntax.
11   void* operator new(std::size_t size, float = 0.0f)
12   {
13     return ::operator new(size);
14   }
16   // The matching deallocation function must be called, which means
17   //  the placemente delete.
18   void operator delete(void*);
19   void operator delete(void*, float) {}
21   A()
22   { throw 5; }
25 int main()
27   (void)new A;