diff --git a/test/CFrontend/2006-10-30-ArrayCrash.c b/test/CFrontend/2006-10-30-ArrayCrash.c new file mode 100644 index 00000000000..b0663c1f1f0 --- /dev/null +++ b/test/CFrontend/2006-10-30-ArrayCrash.c @@ -0,0 +1,16 @@ +// RUN: %llvmgcc -O3 -S -o - %s + +extern void foo(); + +struct S { + short f1[3]; + unsigned int f2 : 1; +}; + +void bar() +{ + struct S *A; + + if (A->f2) + foo(); +}