testcase that crashed the new CFE
llvm-svn: 26465
diff --git a/llvm/test/Regression/C++Frontend/2006-03-01-GimplifyCrash.cpp b/llvm/test/Regression/C++Frontend/2006-03-01-GimplifyCrash.cpp
new file mode 100644
index 0000000..b0d00fe
--- /dev/null
+++ b/llvm/test/Regression/C++Frontend/2006-03-01-GimplifyCrash.cpp
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -S %s -o -
+
+struct PrefMapElem {
+ virtual ~PrefMapElem();
+ unsigned int fPrefId;
+};
+
+int foo() {
+ PrefMapElem* fMap;
+ if (fMap[0].fPrefId == 1)
+ return 1;
+
+ return 0;
+}