| Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X32 %s | 
| Anders Carlsson | e139f86 | 2009-08-08 19:43:14 +0000 | [diff] [blame] | 2 | // CHECK-X32: %struct.s0 = type { i64, i64, i32, [12 x i32] } | 
|  | 3 | // CHECK-X32: %struct.s1 = type { [15 x i32], %struct.s0 } | 
|  | 4 |  | 
| Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix X64 %s | 
| Anders Carlsson | e139f86 | 2009-08-08 19:43:14 +0000 | [diff] [blame] | 6 | // CHECK-X64: %struct.s0 = type <{ i64, i64, i32, [12 x i32] }> | 
|  | 7 | // CHECK-X64: %struct.s1 = type <{ [15 x i32], %struct.s0 }> | 
|  | 8 |  | 
|  | 9 | // rdar://problem/7095436 | 
|  | 10 | #pragma pack(4) | 
|  | 11 |  | 
|  | 12 | struct s0 { | 
|  | 13 | long long a __attribute__((aligned(8))); | 
|  | 14 | long long b __attribute__((aligned(8))); | 
|  | 15 | unsigned int c __attribute__((aligned(8))); | 
|  | 16 | int d[12]; | 
|  | 17 | } a; | 
|  | 18 |  | 
|  | 19 | struct s1 { | 
|  | 20 | int a[15]; | 
|  | 21 | struct s0 b; | 
|  | 22 | } b; | 
|  | 23 |  |