2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / array1.C
blob304035ffc4781ab4a10676b716d8fff9b57b64f6
1 // { dg-do run  }
2 // GROUPS passed arrays
3 // array file
4 // Message-Id: <9204120353.AA06266@cs.rice.edu>
5 // From: dougm@cs.rice.edu (Doug Moore)
6 // Subject: constructors not called on new'ed array elements
7 // Date: Sat, 11 Apr 92 22:53:35 CDT
9 #include <stdio.h>
11 int i = 0;
13 class foo
15 private:
16   static foo *array;
17 public:
18   foo()
19     {
20       i++;
21     }
24 foo* foo::array = new foo [5];
26 int main()
28   if (i != 5)
29     { printf ("FAIL\n"); return 1; }
30   else
31     printf ("PASS\n");