2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / ctors8.C
blob0e5fa0a3f5524336f4bdcec696392a050ba7f8d6
1 // { dg-do run  }
2 // GROUPS passed constructors
3 // ctor file
4 // Message-Id: <199212160609.AA18247@phecda.cs.sfu.ca>
5 // From: Taj Khattra <khattra@cs.sfu.ca>
6 // Subject: gcc 2.3.1 global ctor bug ?
7 // Date: Tue, 15 Dec 92 22:09:37 PST
9 #include <stdio.h>
11 struct foo {
12      foo() : index(-1) {}
13      int index;
16 foo *arr = new foo[2];
18 int main()
20   if (arr[0].index == -1
21       && arr[1].index == -1)
22     printf ("PASS\n");
23   else
24     { printf ("FAIL\n"); return 1; }