From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4562B3857720; Thu, 7 Mar 2024 14:22:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4562B3857720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709821327; bh=79XzaeS93nJr2aAqTKVvoMi5qwyCVEuwySZzNPqtF3o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BYMZ5QBDmrYzLzGrn/GW3/qPQAGeeT1QKMjAv1JkRUtZJ/vjsojH7pP7vZVUqqbep NvMzEkqJbzkxvk/Qh4vA+PYHUcOVSaacqEL7IRaldSqc7t+oU4lYIoOvlQvG0ycfjF aiElTgGTWimhxBNz4fXzylcmZzOs039RV4mK+o8Y= 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:22:06 +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 #5 from GCC Commits --- The releases/gcc-12 branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:f9e1d7aa8b4f0b8afff1de59fcadf1db0244b4e1 commit r12-10197-gf9e1d7aa8b4f0b8afff1de59fcadf1db0244b4e1 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.=