repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[clang] Handle __declspec() attributes in using
[llvm-project.git]
/
clang
/
test
/
CodeGenCXX
/
2007-04-05-StructPackedFieldUnpacked.cpp
blob
c848e7cb7dd9f1fc8a4ee35f232addb5353c3f0f
1
// RUN: %clang_cc1 -emit-llvm %s -o -
2
3
#ifdef PACKED
4
#define P __attribute__((packed))
5
#else
6
#define P
7
#endif
8
9
struct
UnPacked
{
10
int
X
;
11
int
Y
;
12
};
13
14
struct
P M_Packed
{
15
unsigned char
A
;
16
struct
UnPacked B
;
17
};
18
19
struct
M_Packed sM_Packed
;
20
21
int
testM_Packed
(
void
) {
22
struct
M_Packed x
;
23
return
(
x
.
B
.
Y
!=
0
);
24
}