mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-19 19:51:12 +08:00
re PR c++/84092 (ICE on C++14 code with variable template: in build_qualified_name, at cp/tree.c:2043)
/cp 2018-01-31 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84092 * semantics.c (finish_qualified_id_expr): When handling an UNBOUND_CLASS_TEMPLATE only adjust qualifying_class and expr. /testsuite 2018-01-31 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84092 * g++.dg/cpp1y/var-templ57.C: New. From-SVN: r257242
This commit is contained in:
parent
4ecd9c156c
commit
be197ade2e
@ -1,3 +1,9 @@
|
||||
2018-01-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/84092
|
||||
* semantics.c (finish_qualified_id_expr): When handling an
|
||||
UNBOUND_CLASS_TEMPLATE only adjust qualifying_class and expr.
|
||||
|
||||
2018-01-31 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/84138
|
||||
|
@ -2001,12 +2001,12 @@ finish_qualified_id_expr (tree qualifying_class,
|
||||
if (template_p)
|
||||
{
|
||||
if (TREE_CODE (expr) == UNBOUND_CLASS_TEMPLATE)
|
||||
/* cp_parser_lookup_name thought we were looking for a type,
|
||||
but we're actually looking for a declaration. */
|
||||
expr = build_qualified_name (/*type*/NULL_TREE,
|
||||
TYPE_CONTEXT (expr),
|
||||
TYPE_IDENTIFIER (expr),
|
||||
/*template_p*/true);
|
||||
{
|
||||
/* cp_parser_lookup_name thought we were looking for a type,
|
||||
but we're actually looking for a declaration. */
|
||||
qualifying_class = TYPE_CONTEXT (expr);
|
||||
expr = TYPE_IDENTIFIER (expr);
|
||||
}
|
||||
else
|
||||
check_template_keyword (expr);
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-01-31 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/84092
|
||||
* g++.dg/cpp1y/var-templ57.C: New.
|
||||
|
||||
2018-01-31 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/84138
|
||||
|
4
gcc/testsuite/g++.dg/cpp1y/var-templ57.C
Normal file
4
gcc/testsuite/g++.dg/cpp1y/var-templ57.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/84092
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
template < typename T > int a (T::template b);
|
Loading…
x
Reference in New Issue
Block a user