aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/arg5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/arg5.C')
-rw-r--r--gcc/testsuite/g++.dg/template/arg5.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/arg5.C b/gcc/testsuite/g++.dg/template/arg5.C
new file mode 100644
index 00000000000..3d67143b12d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/arg5.C
@@ -0,0 +1,9 @@
+// PR c++/30534
+// { dg-do compile }
+
+template<bool> struct A;
+
+template<int> void foo()
+{
+ A<__builtin_constant_p(.)> a; // { dg-error "template argument" }
+}