diff options
author | Jason Merrill <jason@redhat.com> | 2015-05-18 14:08:53 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-05-18 14:08:53 -0400 |
commit | f41aecf4283f14f54fb0774103fbf7931dff2aa3 (patch) | |
tree | fc074cb5009035b8b52fdb0faecb2c4cfc38508e | |
parent | b237c4cbd3da7a266863ed049cbb2ef60b0aaa81 (diff) | |
download | gcc-f41aecf4283f14f54fb0774103fbf7931dff2aa3.zip gcc-f41aecf4283f14f54fb0774103fbf7931dff2aa3.tar.gz gcc-f41aecf4283f14f54fb0774103fbf7931dff2aa3.tar.bz2 |
pt.c (retrieve_specialization): Make sure our arguments have gone through strip_typedefs.
* pt.c (retrieve_specialization): Make sure our arguments have
gone through strip_typedefs.
From-SVN: r223305
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/pt.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 04576e5..b21e6a0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2015-05-18 Jason Merrill <jason@redhat.com> + * pt.c (retrieve_specialization): Make sure our arguments have + gone through strip_typedefs. + * pt.c (tsubst_decl) [VAR_DECL]: Call coerce_innermost_template_parms. (determine_specialization): Call coerce_template_parms. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 2166f5f..60f3958 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1058,6 +1058,14 @@ retrieve_specialization (tree tmpl, tree args, hashval_t hash) ? TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl)) : template_class_depth (DECL_CONTEXT (tmpl)))); +#ifdef ENABLE_CHECKING + /* We should have gone through coerce_template_parms by now. */ + ++processing_template_decl; + if (!any_dependent_template_arguments_p (args)) + gcc_assert (strip_typedefs_expr (args, NULL) == args); + --processing_template_decl; +#endif + if (optimize_specialization_lookup_p (tmpl)) { tree class_template; |