From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 140833855593; Thu, 20 Jul 2023 14:33:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 140833855593 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689863606; bh=i/Kl55PpCLBbMdnkHVN+O3OcwYY/p13dfa1VK1bpAUc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w/dzYkSfxyliUnVkdSl5XMUbEZ/HAxFUFTi7rZBU1ivB6+9N5r8jCxjt95LpSRrWl DufgMV/TEd3IlNsURP1aDpwZj5M2+FcdVC6xyDZ1EwRo0ZdYixi7BiaU1lqPKW7SkS jJvtZPWDVQsI5m/quAeg/Hq51Weee1A0GP2IX7aM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110114] [13/14 Regression] ICE on calling overloaded function in case of incomplete argument type and C++ designated initializers Date: Thu, 20 Jul 2023 14:33:25 +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: 13.1.0 X-Bugzilla-Keywords: ice-on-invalid-code, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110114 --- Comment #5 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:2cb0dc866e8f95151df5d759157708108e850dd9 commit r14-2677-g2cb0dc866e8f95151df5d759157708108e850dd9 Author: Marek Polacek Date: Wed Jul 19 08:47:29 2023 -0400 c++: fix ICE with designated initializer [PR110114] r13-1227 added an assert checking that the index in a CONSTRUCTOR is a FIELD_DECL. That's a reasonable assumption but in this case we never called reshape_init due to the type being incomplete, and so the index remained an identifier node: get_class_binding never got around to looking up the FIELD_DECL. We can avoid the crash by returning early in implicit_conversion_1; we'd return NULL anyway due to: if (i < CONSTRUCTOR_NELTS (ctor)) return NULL; in build_aggr_conv. PR c++/110114 gcc/cp/ChangeLog: * call.cc (implicit_conversion_1): Return early if the type isn= 't complete. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist100.C: Adjust expected diagnostic. * g++.dg/cpp2a/desig28.C: New test. * g++.dg/cpp2a/desig29.C: New test.=