brintos

brintos / llvm-project-archived public Read only

0
0
Text · 797 B · b8daf40 Raw
32 lines · c
1// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s2// expected-no-diagnostics3 4#pragma pack(push, 1)5struct s0 {6  char f0;7  int  f1 __attribute__((aligned(4)));8};9extern int a[sizeof(struct s0) == 5 ? 1 : -1];10#pragma pack(pop)11 12struct __attribute__((packed)) s1 {13  char f0;14  int  f1 __attribute__((aligned(4)));15};16extern int a[sizeof(struct s1) == 8 ? 1 : -1];17 18#pragma options align=packed19struct s2 {20  char f0;21  int  f1 __attribute__((aligned(4)));22};23extern int a[sizeof(struct s2) == 5 ? 1 : -1];24#pragma options align=reset25 26#pragma pack(1)27struct s3_0 { unsigned char f0; unsigned int f1; };28int t3_0[sizeof(struct s3_0) == 5 ? 1 : -1];29#pragma options align=reset30struct s3_1 { unsigned char f0; unsigned int f1; };31int t3_1[sizeof(struct s3_1) == 8 ? 1 : -1];32