From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 384043858C41; Sat, 6 Apr 2024 09:16:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 384043858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712395005; bh=TSIC5HKE9jvukvLxzM2CWhBB5BcyF603N8hHpq0DJV4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=f41Kgx4Bu7af1HdIXRxwUngyofRPOcRUO7Hy6vFMMSc+6LHS6/m74zYZfB/bkyibw egh8c1K6OHei4BH3YPlA9Xhm9AJ9Ka4y0qiRHbRVO7TfPP2xoer3wltxZX4EdtXxxd VyVIo0252XxtO3xIEIE8m6VxnL+nh+Y0KDs+t9l8= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/89925] [11 Regression] Wrong array bounds from ALLOCATE with SOURCE or MOLD Date: Sat, 06 Apr 2024 09:16:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status 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=3D89925 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|WAITING |RESOLVED --- Comment #17 from anlauf at gcc dot gnu.org --- Backported as r11-11310-gb755a7af1f2ef1: commit b755a7af1f2ef1f5348d04db20f751e898abcd9d Author: Chung-Lin Tang Date: Fri Dec 3 17:27:17 2021 +0800 fortran: Fix setting of array lower bound for named arrays This patch fixes a case of setting array low-bounds, found for particul= ar uses of SOURCE=3D/MOLD=3D. This adjusts the relevant part in gfc_trans_alloc= ate() to set e3_has_nodescriptor only for non-named arrays. 2021-12-03 Tobias Burnus gcc/fortran/ChangeLog: * trans-stmt.c (gfc_trans_allocate): Set e3_has_nodescriptor to true only for non-named arrays. gcc/testsuite/ChangeLog: * gfortran.dg/allocate_with_source_26.f90: Adjust testcase. * gfortran.dg/allocate_with_mold_4.f90: New testcase. (cherry picked from commit 6262e3a22b3d86afc116480bc59a7bb30b0cfd40) Closing.=