xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2005-09-24-BitFieldCrash.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o -
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc struct tree_common {};
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc struct tree_int_cst {
6*f4a2713aSLionel Sambuc  struct tree_common common;
7*f4a2713aSLionel Sambuc   struct tree_int_cst_lowhi {
8*f4a2713aSLionel Sambuc     unsigned long long low;
9*f4a2713aSLionel Sambuc     long long high;
10*f4a2713aSLionel Sambuc   } int_cst;
11*f4a2713aSLionel Sambuc };
12*f4a2713aSLionel Sambuc 
13*f4a2713aSLionel Sambuc enum XXX { yyy };
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc struct tree_function_decl {
16*f4a2713aSLionel Sambuc   struct tree_common common;
17*f4a2713aSLionel Sambuc   long long locus, y;
18*f4a2713aSLionel Sambuc   __extension__ enum  XXX built_in_class : 2;
19*f4a2713aSLionel Sambuc 
20*f4a2713aSLionel Sambuc };
21*f4a2713aSLionel Sambuc 
22*f4a2713aSLionel Sambuc 
23*f4a2713aSLionel Sambuc union tree_node {
24*f4a2713aSLionel Sambuc   struct tree_int_cst int_cst;
25*f4a2713aSLionel Sambuc   struct tree_function_decl function_decl;
26*f4a2713aSLionel Sambuc };
27*f4a2713aSLionel Sambuc 
28*f4a2713aSLionel Sambuc 
foo(union tree_node * decl)29*f4a2713aSLionel Sambuc void foo (union tree_node * decl) {
30*f4a2713aSLionel Sambuc   decl->function_decl.built_in_class != 0;
31*f4a2713aSLionel Sambuc }
32*f4a2713aSLionel Sambuc 
33*f4a2713aSLionel Sambuc 
34