From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 602263858C3A; Tue, 15 Mar 2022 20:49:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 602263858C3A From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104908] [11/12 Regression] incorrect Fortran out-of-bound runtime error. Date: Tue, 15 Mar 2022 20:49:51 +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: 11.2.0 X-Bugzilla-Keywords: wrong-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: short_desc everconfirmed bug_status cf_reconfirmed_on priority 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2022 20:49:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104908 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|gfortran 11/trunk |[11/12 Regression] |regression: incorrect |incorrect Fortran |Fortran out-of-bound |out-of-bound runtime error. |runtime error. | Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2022-03-15 Priority|P3 |P4 --- Comment #1 from anlauf at gcc dot gnu.org --- Likely caused by the fix for PR95331 (r11-1235). Class-related. Applying diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index cfb6eac11c7..3a14600101f 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -3864,8 +3864,8 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_expr *expr, } decl =3D se->expr; - if (IS_CLASS_ARRAY (sym) && sym->attr.dummy && ar->as->type !=3D AS_DEFE= RRED) - decl =3D sym->backend_decl; + // if (IS_CLASS_ARRAY (sym) && sym->attr.dummy && ar->as->type !=3D AS_DEFERRED) + // decl =3D sym->backend_decl; cst_offset =3D offset =3D gfc_index_zero_node; add_to_offset (&cst_offset, &offset, gfc_conv_array_offset (decl)); apparently "fixes" the wrong bounds check.=