| 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. |
| 5 |
|
| 6 |
extern "C" int printf (const char *, ...); |
| 7 |
|
| 8 |
struct base { |
| 9 |
int f1 : 8; |
| 10 |
int f2 : 8; |
| 11 |
}; |
| 12 |
|
| 13 |
base global_base; |
| 14 |
|
| 15 |
int val1; |
| 16 |
|
| 17 |
int test2 (struct base formal_base, int v1); |
| 18 |
|
| 19 |
int main () |
| 20 |
{ |
| 21 |
val1 = 0x5e5e; |
| 22 |
return test2 (global_base, val1); |
| 23 |
} |
| 24 |
|
| 25 |
int test2 (struct base formal_base, int v1) |
| 26 |
{ |
| 27 |
formal_base.f1 = formal_base.f2; // prevent warnings |
| 28 |
|
| 29 |
if (v1 != 0x5e5e) |
| 30 |
{ printf ("FAIL\n"); return 1; } |
| 31 |
else |
| 32 |
printf ("PASS\n"); |
| 33 |
|
| 34 |
return 0; |
| 35 |
} |