aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/abi/bitfield8.C
blob: 58e74be08fb52d957fcfd5e299d3a7a813bdbd1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-options "-fabi-version=0" }
// { dg-require-effective-target ilp32 }


struct A { 
  virtual void f() {}
  int f1 : 1; 
};

struct B : public A {
  int f2 : 31;
  int f3 : 4; 
  int f4 : 3;
};

int main ()
{
  if (sizeof (B) != 16)
    return 1;
}