annotate clang/test/Sema/pragma-pack-4.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple i686-apple-darwin9 %s -fsyntax-only -verify
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only -verify
anatofuz
parents:
diff changeset
3 // expected-no-diagnostics
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // rdar://problem/7095436
anatofuz
parents:
diff changeset
6 #pragma pack(4)
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 struct s0 {
anatofuz
parents:
diff changeset
9 long long a __attribute__((aligned(8)));
anatofuz
parents:
diff changeset
10 long long b __attribute__((aligned(8)));
anatofuz
parents:
diff changeset
11 unsigned int c __attribute__((aligned(8)));
anatofuz
parents:
diff changeset
12 int d[12];
anatofuz
parents:
diff changeset
13 };
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 struct s1 {
anatofuz
parents:
diff changeset
16 int a[15];
anatofuz
parents:
diff changeset
17 struct s0 b;
anatofuz
parents:
diff changeset
18 };
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 int arr0[((sizeof(struct s1) % 64) == 0) ? 1 : -1];