aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/align-1.c
blob: 187eb5271d28bb50ad3273b15131b4e7b5630b3c (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
/* PR java/10145
   Test that requesting an alignment of 1 does not increase the alignment
   of a long long field.

   { dg-do run }
   { dg-options "" }
*/

extern void abort (void);

struct A
{
  char c;
  long long i;
};

struct B
{
  char c;
  long long i __attribute ((__aligned__ (1)));
};

int main ()
{
  if (sizeof (struct A) != sizeof (struct B))
    abort ();
  return 0;
}