1 // { dg-do run } 2 // GROUPS passed operators 3 // opr-del file 4 // Message-Id: <199301272137.AA25213@world.std.com> 5 // From: kol@world.std.com (Nikolay Yatsenko) 6 // Subject: bug report 7 // Date: Wed, 27 Jan 1993 16:37:30 -0500 8 9 extern "C" int printf(const char* ...); 10 11 int delete_counter = -1; 12 13 struct T{ deleteT14 void operator delete (void * p) {delete_counter ++; ::operator delete(p);} 15 }; 16 main(void)17int main(void) 18 { 19 T * ps1 = new T; 20 21 ::delete ps1; // Wrong T::operator delete() is called here 22 23 if (delete_counter != -1) 24 { printf ("FAIL\n"); return 1; } 25 else 26 printf ("PASS\n"); 27 return 0; 28 } 29