From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BDF0B385841A; Thu, 21 Mar 2024 17:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDF0B385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711043802; bh=xLZ2hWhLjEabts13gRjOV6VDdurWze+6J+LUUtzOx2c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cFmoGwYVAjKO91Xzb0wi3dTcMIqjzYG93dXTOndSV2XjucXNzVOHZ8XLh6xS/XTec hFWTdYgZIDwPJmPjxXyp2lMnm3W1eQS1gaxX7Z057edmpklghnwApMKeKRMEbAM6mv pluvyXOzw6OLn+0ugJk2fiR+EH+5G88SnIqkL0pQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/30802] out of bounds error array I/O not picked up with -fbounds-check Date: Thu, 21 Mar 2024 17:56: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: 4.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: anlauf at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D30802 --- Comment #15 from GCC Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:509352069d6f166d396f4b4a86e71ea521f2ca78 commit r14-9597-g509352069d6f166d396f4b4a86e71ea521f2ca78 Author: Harald Anlauf Date: Wed Mar 20 20:59:24 2024 +0100 Fortran: improve array component description in runtime error message [PR30802] Runtime error messages for array bounds violation shall use the followi= ng scheme for a coherent, abridged description of arrays or array componen= ts of derived types: (1) If x is an ordinary array variable, use "x" (2) if z is a DT scalar and x an array component at level 1, use "z%x" (3) if z is a DT scalar and x an array component at level > 1, or if z is a DT array and x an array (at any level), use "z...%x" Use a new helper function abridged_ref_name for construction of that na= me. gcc/fortran/ChangeLog: PR fortran/30802 * trans-array.cc (abridged_ref_name): New helper function. (trans_array_bound_check): Use it. (array_bound_check_elemental): Likewise. (gfc_conv_array_ref): Likewise. gcc/testsuite/ChangeLog: PR fortran/30802 * gfortran.dg/bounds_check_17.f90: Adjust pattern. * gfortran.dg/bounds_check_fail_8.f90: New test.=