aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend/2006-09-11-BitfieldRefCrash.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-11 22:48:23 +0000
committerChris Lattner <sabre@nondot.org>2006-09-11 22:48:23 +0000
commit3697e307d7b9a109930c7ad5d75df4826a3fd4a2 (patch)
tree161bce45a6bb30a71d6535ef90439c092986259c /test/CFrontend/2006-09-11-BitfieldRefCrash.c
parent63d3220dae7e28116327f419c9b38b541eac1f32 (diff)
downloadexternal_llvm-3697e307d7b9a109930c7ad5d75df4826a3fd4a2.zip
external_llvm-3697e307d7b9a109930c7ad5d75df4826a3fd4a2.tar.gz
external_llvm-3697e307d7b9a109930c7ad5d75df4826a3fd4a2.tar.bz2
new testcase for PR906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend/2006-09-11-BitfieldRefCrash.c')
-rw-r--r--test/CFrontend/2006-09-11-BitfieldRefCrash.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CFrontend/2006-09-11-BitfieldRefCrash.c b/test/CFrontend/2006-09-11-BitfieldRefCrash.c
new file mode 100644
index 0000000..d06cc3a
--- /dev/null
+++ b/test/CFrontend/2006-09-11-BitfieldRefCrash.c
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc %s -S -o -
+// PR906
+
+struct state_struct {
+ unsigned long long phys_frame: 50;
+ unsigned valid : 2;
+} s;
+
+int mem_access(struct state_struct *p) {
+ return p->valid;
+}
+