// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \
// RUN:            | FileCheck %s

union A {
  int f1: 3;
  A();
};

A::A() {}

union B {
  char f1: 35;
  B();
};

B::B() {}

// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT:   0 | union A
// CHECK-NEXT:   0 |   int f1
// CHECK-NEXT:     | [sizeof=4, dsize=1, align=4
// CHECK-NEXT:     |  nvsize=1, nvalign=4]

// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT:   0 | union B
// CHECK-NEXT:   0 |   int f1
// CHECK-NEXT:     | [sizeof=8, dsize=5, align=4
// CHECK-NEXT:     |  nvsize=5, nvalign=4]


// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \
// RUN:            | FileCheck %s

union A {
  int f1: 3;
  A();
};

A::A() {}

union B {
  int f1: 69;
  B();
};

B::B() {}

// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT:   0 | union A
// CHECK-NEXT:   0 |   int f1
// CHECK-NEXT:     | [sizeof=4, dsize=1, align=4
// CHECK-NEXT:     |  nvsize=1, nvalign=4]

// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT:   0 | union B
// CHECK-NEXT:   0 |   int f1
// CHECK-NEXT:     | [{{sizeof=16, dsize=9, align=8|sizeof=12, dsize=9, align=4}}
// CHECK-NEXT:     |  {{nvsize=9, nvalign=8|nvsize=9, nvalign=4}}]


--- 
+++ 
@@ -9,7 +9,7 @@
 A::A() {}
 
 union B {
-  int f1: 69;
+  char f1: 35;
   B();
 };
 
@@ -24,6 +24,6 @@
 // CHECK:*** Dumping AST Record Layout
 // CHECK-NEXT:   0 | union B
 // CHECK-NEXT:   0 |   int f1
-// CHECK-NEXT:     | [{{sizeof=16, dsize=9, align=8|sizeof=12, dsize=9, align=4}}
-// CHECK-NEXT:     |  {{nvsize=9, nvalign=8|nvsize=9, nvalign=4}}]
+// CHECK-NEXT:     | [sizeof=8, dsize=5, align=4
+// CHECK-NEXT:     |  nvsize=5, nvalign=4]
 
Test case B is updated to work for 32-bit and 64-bit platforms

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220271 91177308-0d34-0410-b5e6-96231b3b80d8
