This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84605] internal compiler error: in xref_basetypes, at cp/decl.c:13818
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Feb 2018 23:07:29 +0000
- Subject: [Bug c++/84605] internal compiler error: in xref_basetypes, at cp/decl.c:13818
- Auto-submitted: auto-generated
- References: <bug-84605-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84605
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-02-27
CC| |msebor at gcc dot gnu.org
Known to work| |6.4.0
Ever confirmed|0 |1
Known to fail| |7.3.0, 8.0
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Bisection points to r245587 (gcc 7.0.1):
r245587 | jason | 2017-02-20 01:05:08 -0500 (Mon, 20 Feb 2017) | 4 lines
PR c++/79580 - ICE with compound literal
* parser.c (cp_parser_class_head): If we're in the middle of an
expression, use ts_within_enclosing_non_class.
Before then, GCC would reject the code with:
pr84605.C:3:11: error: expected identifier before ‘(’ token
x(((struct b {})));
^
pr84605.C:3:20: error: ‘b::b’ has the same name as the class in which it is
declared
x(((struct b {})));
^
pr84605.C:3:26: error: ISO C++ forbids declaration of ‘x’ with no type
[-fpermissive]
x(((struct b {})));
^