From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 34F12385840C; Mon, 24 Oct 2022 08:39:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34F12385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666600757; bh=B/FYMSRm5vmj9htOWc217X9cJViTbsYSn7+FQl1nfIM=; h=From:To:Subject:Date:From; b=aOoCgR0cmuCnBv8kAFIsntllcQXvQjSguKplfzP+HBSuc2NCZroiGwVNHjyKUIISR SzVlgVgD1C91G1AVVdb+czw3zwJ1OlFtibvLHL7rVPoORFD8sTvBaVVfxcwqWb8ENF G9eH3ggFnnoxJT26aFOv5GsLKt8nf/x7IXBVgIwE= From: "raphael.monod at wanadoo dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107373] New: Unexpected result with loop optimisation Date: Mon, 24 Oct 2022 08:39:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 8.5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: raphael.monod at wanadoo dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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=3D107373 Bug ID: 107373 Summary: Unexpected result with loop optimisation Product: gcc Version: 8.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: raphael.monod at wanadoo dot fr Target Milestone: --- Created attachment 53765 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53765&action=3Dedit Source of test producing the bug (MWE) The attached test show the vector "tab_int_from_logical" contains -1, altho= ugh +1 are expected. Compiler option -O3 is required to get this bug. Adding a print in the loop go around it. Degreasing the dimension 'IDIM' from 16 to 15 go around it. I do not have test all GCC releases, but I met this bug with release : 7.3.= 0, 8.2.0, 8.5.0, 9.4.0. Everything is good with releases 6.3.0, 11.3.0, 12.1.0 I known that releases used to produce this bug are no longer supported, bug= I think that debian 10 (which is again supported) use 8.x GCC release.=