aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/packed-1.c
blob: c8e6a47b93f4e71b2428cd0336fc8ccde2da0930 (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
void abort (void);
void exit (int);

short x1 = 17;

struct
{
  short i __attribute__ ((packed));
} t;

void
f ()
{
  t.i = x1;
  if (t.i != 17)
    abort ();
}

int
main (void)
{
  f ();
  exit (0);
}