From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 605073858D28; Sun, 21 Apr 2024 09:21:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 605073858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713691319; bh=o6BBAGdUamje8t88z23UTD9Y+gkwqGf8qirN8JpAb+U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SgULUshl9d4LUpkzTd+5S+hgRLBdOI62RyVn0g1MM88agNyjZguxBVkXNf5pcwqOt AiUONvMkyjuTtjpKjhaYoDzoyRhptgdd2pB57q+TxxwBjiSnyah2EhPN1LTcXNeXsJ olcbPc7R7a8TCncRVb5nG2t71YdehvjqibGJugwE= From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/114708] [12/13/14 regression] internal error on access to an incomplete formal in generic package Date: Sun, 21 Apr 2024 09:21:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D114708 --- Comment #3 from Eric Botcazou --- This appears to be sufficient: diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 04d114694ab..f81380846e0 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6076,6 +6076,12 @@ package body Exp_Util is Utyp :=3D Underlying_Type (Base_Type (Utyp)); + -- Handle incomplete types + + if No (Utyp) then + return Empty; + end if; + -- Deal with untagged derivation of private views. If the parent is -- now known to be protected, the finalization routine is the one -- defined on the corresponding record of the ancestor (correspondi= ng=