From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 996883858D37; Mon, 17 Jul 2023 11:15:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 996883858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689592533; bh=5RiT5BSPPNXzsPwNUrsn9uGswfHlbjjAIwtk/S9+VbM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rtbg7+Brg07lE5x/U9escgMOfX6JNxbXFwKdSO5peybxW/JMRUlCcr1E+RteEcpYA P56i4JVgXDdL6h0OG1LwtKaL3Nx7aFwTky72qZdfjSVaBmaMXYF8cu8zh3cCxJzt+H 5qUhREo8mwkIGktGzXUnK+PQNetctSmVsKjqMyKI= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107424] [13/14 Regression] ICE in gfc_trans_omp_do, at fortran/trans-openmp.cc:5397 - and wrong code - with non-rectangular loops Date: Mon, 17 Jul 2023 11:15:32 +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: 13.0 X-Bugzilla-Keywords: accepts-invalid, ice-on-valid-code, openmp, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: 13.2 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=3D107424 --- Comment #14 from Tobias Burnus --- (In reply to Tobias Burnus from comment #12) > Handle loop steps other than =C2=B11. Fortran (here F2023) has under "11.1.7.4.3 The execution cycle" (for "DO"): "... consists of the following steps ..." "(1) The iteration count, if any, is tested. If it is zero, the loop termin= ates ... "(2) The block of the loop is executed.28 "(3) The iteration count, if any, is decremented by one. The DO variable, if any, is incremented by the value of the incrementation parameter m3." And Fortran states: "The execution of any numeric operation whose result is= not defined by the arithmetic used by the processor is prohibited." (10.1.5.2.4 Evaluation of numeric intrinsic operations). * * * Thus (cf. email linked in comment 12), simply extending this to any constant step should be possible. (For the other cases, see email.)=