xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/packed-union.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc typedef struct _attrs {
4f4a2713aSLionel Sambuc         unsigned file_attributes;
5f4a2713aSLionel Sambuc         unsigned char filename_length;
6f4a2713aSLionel Sambuc } __attribute__((__packed__)) attrs;
7f4a2713aSLionel Sambuc 
8*0a6a1f1dSLionel Sambuc // CHECK: %union._attr_union = type <{ i32, i8 }>
9f4a2713aSLionel Sambuc typedef union _attr_union {
10f4a2713aSLionel Sambuc   attrs file_attrs;
11f4a2713aSLionel Sambuc   unsigned owner_id;
12f4a2713aSLionel Sambuc } __attribute__((__packed__)) attr_union;
13f4a2713aSLionel Sambuc 
14f4a2713aSLionel Sambuc attr_union u;
15f4a2713aSLionel Sambuc 
16