diff options
author | Jason Merrill <jason@redhat.com> | 2016-12-22 15:29:07 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-12-22 15:29:07 -0500 |
commit | bcf77f8ae6b9616537d539de911124a1db219aac (patch) | |
tree | ef1ff916620ef8c03a175a76f9356d155d517efc /gcc/cp | |
parent | 67a5ad7cbdef324726772a35b03474f51c3e1a46 (diff) | |
download | gcc-bcf77f8ae6b9616537d539de911124a1db219aac.zip gcc-bcf77f8ae6b9616537d539de911124a1db219aac.tar.gz gcc-bcf77f8ae6b9616537d539de911124a1db219aac.tar.bz2 |
PR c++/78906 - ICE with member variable template
* pt.c (finish_template_variable): Use most_general_template.
From-SVN: r243897
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/pt.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6f193c4..2969762 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2016-12-22 Jason Merrill <jason@redhat.com> + PR c++/78906 + * pt.c (finish_template_variable): Use most_general_template. + PR c++/78898 PR c++/42329 * pt.c (unify): Don't look for a class template from a non-class. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 7711546..3fa2ce9 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -9000,6 +9000,7 @@ finish_template_variable (tree var, tsubst_flags_t complain) tree tmpl_args = DECL_TI_ARGS (DECL_TEMPLATE_RESULT (templ)); arglist = add_outermost_template_args (tmpl_args, arglist); + templ = most_general_template (templ); tree parms = DECL_TEMPLATE_PARMS (templ); arglist = coerce_innermost_template_parms (parms, arglist, templ, complain, /*req_all*/true, |