blob: 6d73bd2336e4fbe4e0859115c2070838f5305f2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// GROUPS passed code-generation
// Check that passing things which are not a multiple of
// 4 bytes in size doesn't mess up other subsequent parameters.
extern "C" void printf (char *, ...);
struct base {
int f1 : 8;
int f2 : 8;
};
base global_base;
int val1;
int test2 (struct base formal_base, int v1);
int main ()
{
val1 = 0x5e5e;
return test2 (global_base, val1);
}
int test2 (struct base formal_base, int v1)
{
formal_base.f1 = formal_base.f2; // prevent warnings
if (v1 != 0x5e5e)
printf ("FAIL\n");
else
printf ("PASS\n");
return 0;
}
|