2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / code-gen3.C
blob62f8d758514d8c26d372051d5c27f14c5206a1fe
1 // { dg-do run  }
2 // GROUPS passed code-generation
3 // Check that passing things which are not a multiple of
4 // 4 bytes in size doesn't mess up other subsequent parameters.
6 extern "C" int printf (const char *, ...); 
8 struct base {
9         int f1 : 8;
10         int f2 : 8;
13 base global_base;
15 int val1;
17 int test2 (struct base formal_base, int v1);
19 int main ()
21         val1 = 0x5e5e;
22         return test2 (global_base, val1);
25 int test2 (struct base formal_base, int v1)
27         formal_base.f1 = formal_base.f2;        // prevent warnings
29         if (v1 != 0x5e5e)
30           { printf ("FAIL\n"); return 1; }
31         else
32           printf ("PASS\n");
34         return 0;