Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.law / operators27.C
blobc284a2a3cde958930e28afb68c5ec52d38f4d0d4
1 // { dg-do run  }
2 // GROUPS passed operators
3 // opr-new file
4 // From: David Binderman 3841 <dcb@us-es.sel.de>
5 // Date:     Mon, 21 Jun 93 11:42:11 +0200
6 // Subject:  G++ 2.4.3 and operator new
7 // Message-ID: <9306210942.AA10276@slsvitt.us-es.sel.de>
9 int FLAG=0;
11 #include <new>
13 extern "C" int printf( const char *, ...);
15 void * operator new(size_t, const std::nothrow_t&) throw()         { FLAG=1; return 0; }
17 class K {
18 private:
19         int i;
20 public:
21         K( int j) {
22                 i = j;
23         }
26 int main(void)
28     K * pK = new (std::nothrow) K( 10);
29     if ( FLAG != 1 )
30         { printf ("FAIL\n"); return 1; }
31     else
32         printf ("PASS\n");
33     return 0;