[Bug c++/84537] [8 Regression] ICE in get_string, at spellcheck-tree.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84537 --- Comment #4 from Marek Polacek --- Author: mpolacek Date: Mon Feb 26 14:12:25 2018 New Revision: 257988 URL: https://gcc.gnu.org/viewcvs?rev=257988=gcc=rev Log: PR c++/84537 * name-lookup.c (suggest_alternative_in_explicit_scope): Return false if name is error node. * g++.dg/parse/error60.C: New test. Added: trunk/gcc/testsuite/g++.dg/parse/error60.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/name-lookup.c trunk/gcc/testsuite/ChangeLog
[Bug c++/84537] [8 Regression] ICE in get_string, at spellcheck-tree.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84537 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Marek Polacek --- Fixed.
[Bug c++/84537] [8 Regression] ICE in get_string, at spellcheck-tree.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84537 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
[Bug c++/84537] [8 Regression] ICE in get_string, at spellcheck-tree.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84537 --- Comment #3 from Marek Polacek --- I think just --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -5541,6 +5541,10 @@ bool suggest_alternative_in_explicit_scope (location_t location, tree name, tree scope) { + /* Something went very wrong; don't suggest anything. */ + if (name == error_mark_node) +return false; + /* Resolve any namespace aliases. */ scope = ORIGINAL_NAMESPACE (scope); should do.
[Bug c++/84537] [8 Regression] ICE in get_string, at spellcheck-tree.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84537 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-02-24 CC||mpolacek at gcc dot gnu.org Target Milestone|--- |8.0 Ever confirmed|0 |1 --- Comment #2 from Marek Polacek --- Started with r255336.
[Bug c++/84537] [8 Regression] ICE in get_string, at spellcheck-tree.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84537 --- Comment #1 from Volker Reichelt --- With a slightly modified testcase (namespace std instead of N) I get a different stack-trace: === namespace std { template struct A {}; } std::template A<> a; === bug.cc:6:17: error: wrong number of template arguments (0, should be 1) std::template A<> a; ^ bug.cc:3:24: note: provided for 'template > struct std::A' template struct A {}; ^ bug.cc:6:15: error: '' in namespace 'std' does not name a type std::template A<> a; ^~~ bug.cc:6:15: internal compiler error: in maybe_suggest_missing_header, at cp/name-lookup.c:5519 0x620703 maybe_suggest_missing_header ../../gcc/gcc/cp/name-lookup.c:5519 0x620703 suggest_alternative_in_explicit_scope(unsigned int, tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:5547 0x90cf87 cp_parser_diagnose_invalid_type_name ../../gcc/gcc/cp/parser.c:3370 0x9353ed cp_parser_parse_and_diagnose_invalid_type_name ../../gcc/gcc/cp/parser.c:3468 0x93c76f cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:12946 0x93cfd8 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:12869 0x940f32 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12767 0x941341 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12643 0x941634 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4559 0x941634 c_parse_file() ../../gcc/gcc/cp/parser.c:38866 0xa3f966 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1132 Please submit a full bug report, [etc.]