summaryrefslogtreecommitdiff
path: root/test/C++Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-29 00:03:45 +0000
committerChris Lattner <sabre@nondot.org>2003-08-29 00:03:45 +0000
commit77e94d645b07b10262be2fd4bfa5ad60c019f9bd (patch)
tree5c57daaa5dc7c2cf6bbc5e260ca454e7868d38a2 /test/C++Frontend
parent85544baf5408f13b6ac0ab194cb7f1f739b77515 (diff)
downloadllvm-77e94d645b07b10262be2fd4bfa5ad60c019f9bd.tar.gz
llvm-77e94d645b07b10262be2fd4bfa5ad60c019f9bd.tar.bz2
llvm-77e94d645b07b10262be2fd4bfa5ad60c019f9bd.tar.xz
New testcase, not only possible of causing compilation failures, but could
also cause miscompilations! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/C++Frontend')
-rw-r--r--test/C++Frontend/2003-08-28-SaveExprBug.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/C++Frontend/2003-08-28-SaveExprBug.cpp b/test/C++Frontend/2003-08-28-SaveExprBug.cpp
new file mode 100644
index 0000000000..a94ff03c68
--- /dev/null
+++ b/test/C++Frontend/2003-08-28-SaveExprBug.cpp
@@ -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>;