From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93D773858C50; Mon, 15 May 2023 19:24:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93D773858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684178694; bh=oiOGfdwgTL1KLDzrDZFWy7ZhmpoIapAbozxK5ESaMWc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M7KJhK8teeCABoSAyuD9UrPtNtT0Ifm8a4OityB3jeOvmwxcEdsYMTm/cpd4H4ulS W44+g1pQFQVPwdVzJ4llMHaBzpoicqrw8M9dRsjYa2DE0RNxUdp/RqgxtVHTZ+M9+A EctvzMbLKr0xzYZNP0EY+u96tVf8JQ0NTKe3Cq84= From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109865] different results when routine moved inside the contains statement Date: Mon, 15 May 2023 19:24:54 +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: og12 (devel/omp/gcc-12) X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: WAITING 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: 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=3D109865 --- Comment #4 from Steve Kargl -= -- On Mon, May 15, 2023 at 07:11:17PM +0000, Gary.White at ColoState dot edu wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109865 > (In reply to kargl from comment #2) > > (In reply to GARY.WHITE@ColoState.edu from comment #0) > >=20 > > > Options being used to compile the code: > > > COPTIONS =3D -cpp -std=3Df2018 -c -D ieee -D dbleprecision -m64 > > > -fsignaling-nans -ffpe-summary=3D'invalid','zero','overflow','underfl= ow' -O3 > > > -funroll-loops -ffast-math=20 > >=20 > > What happens if you remove -ffast-math and use -O0 or -O1? >=20 > -O0 generates correct code with or without -ffastmath, -O1 does not gener= ate > correct code. I assume you've also tried with -fcheck=3Dall. Your report states you're using og12. If=20 it supports the sanitizer, can you add=20 -fsanitize=3Dundefined to the options?=