projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Testcase for PR1678.
[oota-llvm.git]
/
test
/
CFrontend
/
2007-09-12-PragmaPack.c
1
// RUN: %llvmgcc -O3 -S -o - %s | grep {26}
2
3
#include <stdint.h>
4
5
#pragma pack(push, 1)
6
typedef struct
7
{
8
uint32_t a;
9
uint8_t * b;
10
} foo;
11
12
typedef struct {
13
uint8_t major;
14
uint8_t minor;
15
uint16_t build;
16
} VERSION;
17
18
typedef struct {
19
uint8_t a[5];
20
VERSION version;
21
uint8_t b;
22
char * c;
23
foo d;
24
uint32_t guard;
25
} bar;
26
#pragma pack(pop)
27
28
29
unsigned barsize(void) {
30
return sizeof(bar);
31
}
32