summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-08-19 23:41:35 +0000
committerEric Christopher <echristo@apple.com>2011-08-19 23:41:35 +0000
commit16d482ebe8abb5a8eaf5d3407e90c96e6afa397b (patch)
tree64ab951fba84642023f720914ea19c36e1ed43f9 /test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp
parentc0b850c2f729521d1b70c7dd21cda135286ef904 (diff)
Migrate, FileCheckize and update:
2005-02-11-AnonymousUnion.cpp 2005-02-13-BadDynamicInit.cpp 2005-02-14-BitFieldOffset.cpp 2005-02-19-BitfieldStructCrash.cpp 2005-02-19-UnnamedVirtualThunkArgument.cpp 2005-02-20-BrokenReferenceTest.cpp 2006-03-01-GimplifyCrash.cpp 2006-03-06-C++RecurseCrash.cpp 2006-09-12-OpaqueStructCrash.cpp 2006-10-30-ClassBitfield.cpp 2006-11-20-GlobalSymbols.cpp 2006-11-20-GlobalSymbols.ll 2006-11-30-ConstantExprCrash.cpp from llvm/test/FrontendC++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp')
-rw-r--r--test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp b/test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp
new file mode 100644
index 0000000000..b809751cd0
--- /dev/null
+++ b/test/CodeGenCXX/2006-03-01-GimplifyCrash.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+
+struct PrefMapElem {
+ virtual ~PrefMapElem();
+ unsigned int fPrefId;
+};
+
+int foo() {
+ PrefMapElem* fMap;
+ if (fMap[0].fPrefId == 1)
+ return 1;
+
+ return 0;
+}