diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-06-27 19:14:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-06-27 19:14:32 +0000 |
commit | 1f031ccac56820467eff9b6d620dffca78ce122c (patch) | |
tree | fa419d82e3c7c32ffb029497374895bfe483b392 /test/CodeGen/ms_struct-long-double.c | |
parent | 5c8694c6ce76fdf2c8630f569e375cf343894dab (diff) |
Notes
Diffstat (limited to 'test/CodeGen/ms_struct-long-double.c')
-rw-r--r-- | test/CodeGen/ms_struct-long-double.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/ms_struct-long-double.c b/test/CodeGen/ms_struct-long-double.c new file mode 100644 index 0000000000000..9b3ea7947a03c --- /dev/null +++ b/test/CodeGen/ms_struct-long-double.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-gnu -fdump-record-layouts %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts -Wno-incompatible-ms-struct %s | FileCheck %s +// RUN: not %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts %s 2>&1 | FileCheck %s -check-prefix=ERROR + +struct ldb_struct { + char c; + long double ldb; +} __attribute__((__ms_struct__)); + +struct ldb_struct a; + +// CHECK: 0 | struct ldb_struct +// CHECK-NEXT: 0 | char c +// CHECK-NEXT: 4 | long double ldb +// CHECK-NEXT: | [sizeof=16, align=4] + +// ERROR: error: ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren't a power of two |