aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-08-09 14:55:42 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-08-09 14:55:42 -0400
commit9cc82a019817f8eaf807831dd34afc8701d37ee0 (patch)
tree2579b2a24bef7bd58b98cb30bdf21b40f5462703 /gcc
parenta58df068f4b9bedbe4917b9d564288ef06b76e6e (diff)
downloadgcc-9cc82a019817f8eaf807831dd34afc8701d37ee0.zip
gcc-9cc82a019817f8eaf807831dd34afc8701d37ee0.tar.gz
gcc-9cc82a019817f8eaf807831dd34afc8701d37ee0.tar.bz2
pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
* pt.c (tsubst_aggr_type): Bail if creating the argvec fails. (tsubst_template_arg_vector): Likewise. From-SVN: r35592
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explarg1.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C b/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C
new file mode 100644
index 0000000..4a1c66b
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explarg1.C
@@ -0,0 +1,21 @@
+// Bug: g++ generates an error trying to generate the first foo<int>, when
+// it should silently fail and go on to the next one.
+
+template<class T, typename U> class A { };
+
+template<class T> void
+foo(const A<T,typename T::N>&);
+
+template<typename T>
+class B { };
+
+template<typename T> void
+foo(B<T> const &) { }
+
+int
+main(void)
+{
+ B<int> sa;
+
+ foo<int> (sa);
+}