summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p3524b.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/p3524b.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p3524b.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p3524b.C b/gcc/testsuite/g++.old-deja/g++.mike/p3524b.C
new file mode 100644
index 000000000..34d106040
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p3524b.C
@@ -0,0 +1,21 @@
+// { dg-do assemble }
+// Make sure we can cast to a templated type, that requires a conversion by
+// constructor, from a derived type to a base type.
+
+// prms-id: 3524
+
+template <class T>
+struct ccPair {
+ ccPair () { }
+};
+
+template <class T>
+struct ccO : ccPair<T> {
+ ccO () { }
+};
+
+void foo ()
+{
+ ccO<float> r;
+ (ccPair<float>)r;
+}