From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E1A7A393D03E; Wed, 13 Jan 2021 16:29:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1A7A393D03E From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98463] [11 Regression] internal compiler error: in output_constructor_regular_field, at varasm.c:5491 by r11-2720 Date: Wed, 13 Jan 2021 16:29:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 16:29:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98463 --- Comment #8 from Jakub Jelinek --- With the patch for C++14 and older the problem is that the empty base has no FIELD_DECL in the RECORD_TYPE at all, so it then doesn't find anything. So for the empty_base && lval case it might be better to return some tree t= hat would make it clear to the caller that the code is valid but that it should= n't really store anything into it. But still, for C++17 and onwards, we shouldn't be setting empty_base for the lval case if we can find the FIELD_DECL for it (so perhaps for lval move the is_empty_class check to the end) and otherwise figure out what to return. A freshly created VAR_DECL, or one that is cached (same VAR_DECL for the sa= me type), something else?=