summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/hmc1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/hmc1.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C b/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C
new file mode 100644
index 000000000..b023125cf
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/hmc1.C
@@ -0,0 +1,19 @@
+// { dg-do assemble }
+// GROUPS passed templates default-arguments
+template <class I>
+class Klasse {
+public:
+ void func1(int n=1);
+ void func2(int d) {}
+};
+template <class I>
+void Klasse<I>::func1(int n) {}
+
+//if this is replaced by:
+//void Klasse<I>::func1(int n=1) {}
+//the code compiles.
+
+int main() {
+ Klasse<int> C;
+ return 0;
+}