diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-05-06 22:32:49 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-05-06 22:32:49 +0000 |
commit | 895a5cc06c213d7610dbd8e8433d4bc61cb6738c (patch) | |
tree | 8d4b6c1431af99f72ad16052e3ca91cf2a4dda9c /gcc/cp | |
parent | 659c0e684c883ab1ac7a5e8eb42c14bee47b3b4c (diff) | |
download | gcc-895a5cc06c213d7610dbd8e8433d4bc61cb6738c.zip gcc-895a5cc06c213d7610dbd8e8433d4bc61cb6738c.tar.gz gcc-895a5cc06c213d7610dbd8e8433d4bc61cb6738c.tar.bz2 |
re PR c++/60999 (ICE when static_cast from constexpr in specialization of template-class)
/cp
2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60999
* pt.c (maybe_begin_member_template_processing): Use
uses_template_parms.
/testsuite
2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60999
* g++.dg/cpp0x/nsdmi-template9.C: New.
* g++.dg/cpp0x/nsdmi-template10.C: Likewise.
From-SVN: r210126
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dce8df6..d3eb4f2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2014-05-06 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/60999 + * pt.c (maybe_begin_member_template_processing): Use + uses_template_parms. + 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com> Mike Stump <mikestump@comcast.net> Richard Sandiford <rdsandiford@googlemail.com> diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 7e7f6d8..d9e273e 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -462,9 +462,13 @@ maybe_begin_member_template_processing (tree decl) bool nsdmi = TREE_CODE (decl) == FIELD_DECL; if (nsdmi) - decl = (CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (decl)) - ? CLASSTYPE_TI_TEMPLATE (DECL_CONTEXT (decl)) - : NULL_TREE); + { + tree ctx = DECL_CONTEXT (decl); + decl = (CLASSTYPE_TEMPLATE_INFO (ctx) + /* Disregard full specializations (c++/60999). */ + && uses_template_parms (ctx) + ? CLASSTYPE_TI_TEMPLATE (ctx) : NULL_TREE); + } if (inline_needs_template_parms (decl, nsdmi)) { |