From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F0733858C50; Thu, 29 Jun 2023 18:59:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F0733858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688065175; bh=yt4zwcE9ezWerNioLP+lxJsWZOoXBZggjpkOb5eV76w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X9ckicXh/PvpVz21TNN6iVWhHxuEfjVCUhvEwBQdiyv6RCu37ygsXSQ5bQu8AeJoj kqhbJDog6sWeEw6DWJSIzkwJlyQn5qfi9+YDSSdxbDlcRly78kH3qFON4s6VeAyisW dOUKGLFBEOURL/MIa4Z3WX1czlwpoZKTyjXakJmk= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110311] [14 Regression] regression in tree-optimizer Date: Thu, 29 Jun 2023 18:59:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org 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: 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=3D110311 --- Comment #27 from anlauf at gcc dot gnu.org --- (In reply to J=C3=BCrgen Reuter from comment #26) > It is included here: > https://www.desy.de/~reuter/downloads/repro002.tar.xz > I am working on a smaller example right now. Good. I can reproduce the failure, but here's what others need to know: - I have to rm -f nlo_9_p2.i1.phs nlo_9_p2.m1.vg2 each time *before* running the test. ??? - I am using the modification to rng_stream_sub.f90 from comment#24 with the printout added - I am switching between res =3D mod (x1, x2) and res =3D x1 - int(x1/x2) * x2 - I am disabling optimization completely for this file and added to Makefil= e: rng_stream_sub.o: rng_stream_sub.f90 $(FC) $(FCFLAGS) -c $< -O0 -fdump-tree-original -fdump-tree-optimiz= ed which gives (v1 is with intrinsic mod, v2 is with explicitly coded mod): --- rng_stream_sub.f90.005t.original.v1 2023-06-29 20:44:58.148284991 +0200 +++ rng_stream_sub.f90.005t.original.v2 2023-06-29 20:45:45.408160849 +0200 @@ -3,7 +3,7 @@ { real(kind=3D8) res; - res =3D __builtin_fmod (*x1, *x2); + res =3D *x1 - (real(kind=3D8)) (integer(kind=3D4)) (*x1 / *x2) * *x2; return res; } as expected. The dump-tree-optimized looks unsuspicious to me.=