diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/CodeGen/unaligned-field.c | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Diffstat (limited to 'test/CodeGen/unaligned-field.c')
-rw-r--r-- | test/CodeGen/unaligned-field.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/unaligned-field.c b/test/CodeGen/unaligned-field.c new file mode 100644 index 0000000000000..5aa59c2799177 --- /dev/null +++ b/test/CodeGen/unaligned-field.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s +// Test that __unaligned does not impact the layout of the fields. + +struct A +{ + char a; + __unaligned int b; +} a; +// CHECK: %struct.A = type { i8, i32 } + +struct A2 +{ + int b; + char a; + __unaligned int c; +} a2; +// CHECK: %struct.A2 = type { i32, i8, i32 } |