From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 72DF43835380; Fri, 21 Oct 2022 20:18:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72DF43835380 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666383519; bh=AnfIZpgXGzcPpsRC+C7hMebg6KV+jiO1m9greANsqfQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OaBzAF4ZHuNPGscYd62R1QIp9Dl2Qwb80V8sdVGVbEuYaI2NHc2hGxG0guArsgQcD 0SmXFYCydbupjsucgZtcLnhdmHL4WsNATTZUsLhFOCSb0fz6K35K2uYIRWwTFXUVtb LE75akth//FA+SF4xoMLVUxPC4pLp8vbKfqs0vmE= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104352] ICE in gfc_conv_intrinsic_anyall, at fortran/trans-intrinsic.cc:4481 (etc.) Date: Fri, 21 Oct 2022 20:18:38 +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: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D104352 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #3 from anlauf at gcc dot gnu.org --- There are also other PRs with ICEs and array bounds violation which might be fixed by turning warnings into errors. The patch in comment#2 misses another pair of checks in check_dimension that need to be adjusted, including the mixup Lower <-> Upper. However, the resulting modification leads to regressions in the following testcases: gfortran.dg/bounds_check_3.f90 gfortran.dg/bounds_check_11.f90 gfortran.dg/goacc/subarrays.f95 gfortran.dg/gomp/map-1.f90 I think we need to know which kind of abuse of array indices we want to accept for legacy code, of which there might be plenty in the wild. Potential candidates where there should be no error, maybe even no warning: - assumed-size arrays - arrays whose last dimension is 1 (only for -std=3Dlegacy (?))=