diff options
Diffstat (limited to 'test/CodeGen/2006-10-30-ArrayCrash.c')
-rw-r--r-- | test/CodeGen/2006-10-30-ArrayCrash.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/2006-10-30-ArrayCrash.c b/test/CodeGen/2006-10-30-ArrayCrash.c new file mode 100644 index 000000000000..67446fd0567b --- /dev/null +++ b/test/CodeGen/2006-10-30-ArrayCrash.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -O3 -emit-llvm -o - %s +// PR954, PR911 + +extern void foo(); + +struct S { + short f1[3]; + unsigned int f2 : 1; +}; + +void bar() +{ + struct S *A; + + if (A->f2) + foo(); +} |