blob: 187d5e3cc6feafb69f38480ac63f17b746cedd07 [file] [log] [blame]
Anton Korobeynikovc55a4d72007-09-11 22:12:26 +00001// RUN: %llvmgcc -O3 -S -o - %s | grep {26}
2
3#include <stdint.h>
4
5#pragma pack(push, 1)
6typedef struct
7{
8 uint32_t a;
9 uint8_t * b;
10} foo;
11
12typedef struct {
13 uint8_t major;
14 uint8_t minor;
15 uint16_t build;
16} VERSION;
17
18typedef 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
29unsigned barsize(void) {
30 return sizeof(bar);
31}
32