From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1587D385770C; Thu, 7 Mar 2024 14:27:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1587D385770C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709821644; bh=8o/6HfgK6B3mJsB2F09oWIuqKA7RqVdnf6VUVDKOyxg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mo1U6wtDHndCxmLmYnl2Cra2YXQ0O4DwtJIRDFIXqnru7bCPPGSIXbP+zqaA7cq1X VFsIGJgllzfl4QQEzogagFw9T+XY8GDxbg/H9bHXa9UVWr7lLaaIwoudPBTKG0YxH5 hHCcEEXe+cDRmQrYMUG8WYu/ajy0yEC8D85Ygw2U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/113979] [11/12/13/14 regression] bogus error on allocator for array type with Dynamic_Predicate Date: Thu, 07 Mar 2024 14:27:23 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D113979 --- Comment #6 from GCC Commits --- The releases/gcc-11 branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:b26501b6e310345ad9f6423b3f8b9df178c5e7d9 commit r11-11272-gb26501b6e310345ad9f6423b3f8b9df178c5e7d9 Author: Eric Botcazou Date: Thu Mar 7 15:05:54 2024 +0100 Fix bogus error on allocator for array type with Dynamic_Predicate This is a regression present on all active branches: the compiler gives a bogus error on an allocator for an unconstrained array type declared with a Dynamic_Predicate because Apply_Predicate_Check is invoked direc= tly on a subtype reference, which it cannot handle. This moves the check to the resulting access value (after dereference) = like in Expand_Allocator_Expression. gcc/ada/ PR ada/113979 * exp_ch4.adb (Expand_N_Allocator): In the subtype indication c= ase, remove call to Apply_Predicate_Check. gcc/testsuite/ * gnat.dg/predicate15.adb: New test.=