diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-07 04:35:02 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-07 04:35:02 +0000 |
commit | 98fe46763bc650592e46cc68117a827f7e40b15b (patch) | |
tree | 3a70da5301392ce4cbe8d929532e03902294f033 /gcc/cp/semantics.c | |
parent | eade09407b56c698678b558de266c72b5c43e85d (diff) | |
download | gcc-98fe46763bc650592e46cc68117a827f7e40b15b.tar.gz |
Fix crash70.C with -std=c++1z.
* semantics.c (finish_qualified_id_expr): Handle
UNBOUND_CLASS_TEMPLATE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231352 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 82f7d3a2c5e..80d1b10ddad 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1929,7 +1929,17 @@ finish_qualified_id_expr (tree qualifying_class, return error_mark_node; if (template_p) - check_template_keyword (expr); + { + 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); + else + check_template_keyword (expr); + } /* If EXPR occurs as the operand of '&', use special handling that permits a pointer-to-member. */ |