New testcase, not only possible of causing compilation failures, but could
authorChris Lattner <sabre@nondot.org>
Fri, 29 Aug 2003 00:03:45 +0000 (00:03 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 29 Aug 2003 00:03:45 +0000 (00:03 +0000)
also cause miscompilations!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8198 91177308-0d34-0410-b5e6-96231b3b80d8

test/C++Frontend/2003-08-28-SaveExprBug.cpp [new file with mode: 0644]

diff --git a/test/C++Frontend/2003-08-28-SaveExprBug.cpp b/test/C++Frontend/2003-08-28-SaveExprBug.cpp
new file mode 100644 (file)
index 0000000..a94ff03
--- /dev/null
@@ -0,0 +1,22 @@
+
+char* eback();
+
+template<typename foo>
+struct basic_filebuf {
+  char *instancevar;
+  void callee() {
+    instancevar += eback() != eback();
+  }
+
+  void caller();
+};
+
+
+template<typename _CharT>
+void basic_filebuf<_CharT>::caller() {
+  callee();
+}
+
+
+template class basic_filebuf<char>;