aboutsummaryrefslogtreecommitdiffstats
path: root/test/C++Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-21 21:55:08 +0000
committerChris Lattner <sabre@nondot.org>2005-07-21 21:55:08 +0000
commita9562059c21b5bca9d13b31efb0c1047d85391c3 (patch)
tree8d8b976fde485da28d45cf6ddfa1756a2fbebf34 /test/C++Frontend
parent2497e6391f8df05926fe17b5cf08dad61c4797d2 (diff)
downloadexternal_llvm-a9562059c21b5bca9d13b31efb0c1047d85391c3.zip
external_llvm-a9562059c21b5bca9d13b31efb0c1047d85391c3.tar.gz
external_llvm-a9562059c21b5bca9d13b31efb0c1047d85391c3.tar.bz2
new testcase for PR602
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/C++Frontend')
-rw-r--r--test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp b/test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp
new file mode 100644
index 0000000..5bc336c
--- /dev/null
+++ b/test/C++Frontend/2005-07-21-VirtualBaseAccess.cpp
@@ -0,0 +1,14 @@
+// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | not grep cast
+
+void foo(int*);
+
+struct FOO {
+ int X;
+};
+
+struct BAR : virtual FOO { BAR(); };
+
+int testfn() {
+ BAR B;
+ foo(&B.X);
+}