1 // GROUPS passed initialization
2 // global-init file
3 // Message-Id: <9212021756.AA12639@grumpy.pocs.com>
4 // From: wp@pocs.com (Wolfgang Polak)
5 // Subject: Initializers - gcc 2.2.2 (g++), SPARC, SunOS 4.1.1
6 // Date: Wed, 2 Dec 92 09:56:01 PST
7 
8 #include <stdio.h>
9 struct S { int  a; int  c; };
10 int i = 3;
11 S s = {6, i};
the_s()12 S * the_s  () { return &s; };
main()13 int main ()
14 {
15   S * cls = the_s ();
16   if (cls->a != 6)
17     { printf ("FAIL\n"); return 1; }
18   else
19     printf ("PASS\n");
20 }
21