blob: 4070bcdc0ffb8be18d282dfeb5ffdaa824c2d42f (
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
35
36
37
38
|
// APPLE LOCAL file test 68k alignment
// Radar 3313261: Positive C++ test case
// Origin: Matt Austern <austern@apple.com>
// { dg-do run }
#pragma options align=mac68k
typedef struct PMR {
double x;
double y;
}PMR;
#pragma options align=reset
static void GetDouble(double *doubleP)
{
*doubleP = 1.;
}
static void GetPMR(PMR *p)
{
GetDouble(&p->x);
GetDouble(&p->y);
}
int main(void)
{
PMR tmp;
bool ok = true;
tmp.x = tmp.y = 0;
ok = ok && tmp.x == 0.0 && tmp.y == 0.0;
GetPMR(&tmp);
ok = ok && tmp.x == 1.0 && tmp.y == 1.0;
return !ok;
}
|