summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/defarg14.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/defarg14.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/defarg14.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/defarg14.C b/gcc/testsuite/g++.old-deja/g++.pt/defarg14.C
new file mode 100644
index 000000000..c4e206136
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/defarg14.C
@@ -0,0 +1,18 @@
+// { dg-do assemble }
+
+// Origin: Larry Evans <jcampbell3@prodigy.net>
+
+// Bug: enum in default template arguments are not properly handled.
+
+enum Enum0 { E0, E1, E2 };
+enum Enum1 { E3=E2+1, E4=E3+1 };
+
+template <Enum0 Out_FARG0> class OutTmpl
+{
+ public:
+ template <Enum0 In_FARG0, Enum1 In_FARG1=E4> class InTmpl
+ {
+ };
+};
+
+OutTmpl<E1> m;