19 lines · c
1// RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-gnu -fdump-record-layouts %s | FileCheck %s2// RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-cygnus -fdump-record-layouts %s | FileCheck %s3// RUN: %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts -Wno-incompatible-ms-struct %s | FileCheck %s4// RUN: not %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts %s 2>&1 | FileCheck %s -check-prefix=ERROR5 6struct ldb_struct {7 char c;8 long double ldb;9} __attribute__((__ms_struct__));10 11struct ldb_struct a;12 13// CHECK: 0 | struct ldb_struct14// CHECK-NEXT: 0 | char c15// CHECK-NEXT: 4 | long double ldb16// CHECK-NEXT: | [sizeof=16, align=4]17 18// ERROR: error: ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren't a power of two19