diff options
author | Jason Merrill <jason@redhat.com> | 2015-06-24 15:59:28 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-06-24 15:59:28 -0400 |
commit | e6d6151387e551d716e5813107bd7e54bd0239e5 (patch) | |
tree | 67aac9552e4bc47a5bf9c85db3df018f44127c60 /gcc/cp | |
parent | 31ca7cbaa81e6a0f2425659797753e7c3e26b6ad (diff) | |
download | gcc-e6d6151387e551d716e5813107bd7e54bd0239e5.zip gcc-e6d6151387e551d716e5813107bd7e54bd0239e5.tar.gz gcc-e6d6151387e551d716e5813107bd7e54bd0239e5.tar.bz2 |
re PR c++/66647 (ICE: in instantiate_class_template_1, at cp/pt.c:9254)
PR c++/66647
* pt.c (dependent_type_p_r): Check for dependent alias template
specialization sooner.
From-SVN: r224917
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2fa1732..9dc9266 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2015-06-24 Jason Merrill <jason@redhat.com> + PR c++/66647 + * pt.c (dependent_type_p_r): Check for dependent alias template + specialization sooner. + PR c++/66501 * class.c (type_has_nontrivial_assignment): Remove. * cp-tree.h: Remove declaration. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 8800af8..b63c0d4 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -20992,6 +20992,12 @@ dependent_type_p_r (tree type) names a dependent type. */ if (TREE_CODE (type) == TYPENAME_TYPE) return true; + + /* An alias template specialization can be dependent even if the + resulting type is not. */ + if (dependent_alias_template_spec_p (type)) + return true; + /* -- a cv-qualified type where the cv-unqualified type is dependent. No code is necessary for this bullet; the code below handles @@ -21043,10 +21049,6 @@ dependent_type_p_r (tree type) && (any_dependent_template_arguments_p (INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (type))))) return true; - /* For an alias template specialization, check the arguments both to the - class template and the alias template. */ - else if (dependent_alias_template_spec_p (type)) - return true; /* All TYPEOF_TYPEs, DECLTYPE_TYPEs, and UNDERLYING_TYPEs are dependent; if the argument of the `typeof' expression is not |