aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-10-16 22:41:32 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-10-16 22:41:32 +0000
commit2e8cd6eb31d5e2fc5b01f3c4ecc12dfa81d9bf5d (patch)
treea5f2c5429e42a122f71cd2ad44e0c14a7ba3963b /gcc
parentbf98d3b6c0453c71f0659848e7673ebc2cc3ee0c (diff)
downloadgcc-2e8cd6eb31d5e2fc5b01f3c4ecc12dfa81d9bf5d.zip
gcc-2e8cd6eb31d5e2fc5b01f3c4ecc12dfa81d9bf5d.tar.gz
gcc-2e8cd6eb31d5e2fc5b01f3c4ecc12dfa81d9bf5d.tar.bz2
re PR c++/28639 (ICE trying to print error on invalid template parameter)
2007-10-16 Paolo Carlini <pcarlini@suse.de> PR c++/28639 PR c++/30299 * g++.dg/template/void12.C: New. * g++.dg/template/void13.C: New. From-SVN: r129392
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/template/void12.C7
-rw-r--r--gcc/testsuite/g++.dg/template/void13.C11
3 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 34f8c08..35adc95 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2007-10-16 Paolo Carlini <pcarlini@suse.de>
+ PR c++/28639
+ PR c++/30299
+ * g++.dg/template/void12.C: New.
+ * g++.dg/template/void13.C: New.
+
+2007-10-16 Paolo Carlini <pcarlini@suse.de>
+
PR c++/31446
* g++.dg/template/void11.C: New.
* g++.dg/template/void2.C: Adjust error markers.
diff --git a/gcc/testsuite/g++.dg/template/void12.C b/gcc/testsuite/g++.dg/template/void12.C
new file mode 100644
index 0000000..1d064b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/void12.C
@@ -0,0 +1,7 @@
+// PR c++/28639
+
+template<void> struct A // { dg-error "not a valid type" }
+{
+ static const int i = 1;
+ char a[i];
+};
diff --git a/gcc/testsuite/g++.dg/template/void13.C b/gcc/testsuite/g++.dg/template/void13.C
new file mode 100644
index 0000000..3f36735
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/void13.C
@@ -0,0 +1,11 @@
+// PR c++/30299
+
+struct A
+{
+ int i;
+};
+
+template<void> struct B : A // { dg-error "not a valid type" }
+{
+ B() { this->i; }
+};