aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/default2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/default2.C')
-rw-r--r--gcc/testsuite/g++.dg/other/default2.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/default2.C b/gcc/testsuite/g++.dg/other/default2.C
new file mode 100644
index 00000000000..be0e5c32413
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/default2.C
@@ -0,0 +1,9 @@
+// PR c++/16829
+// { dg-do "compile" }
+
+template<typename T> void foo(T, int = 0, int) {} // { dg-error "default" }
+
+void bar()
+{
+ foo(0);
+}