From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C51E13857713; Mon, 15 May 2023 18:50:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C51E13857713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684176652; bh=Haz4XHnLDb926ZejfYeEwI7dDqLwWFAazFtdUs2RHUE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GObaWBW7yUrZexdW9CbYHxHtjXq3QJyoNXIDkeftpxcxPBSwVsk/G6Dom2ltEg7xO jJLZXH4WC1pF2G98axENtFdDyQ2bONwPVVtvXXVLTmm77WIsPJrgHED4Itrnm1Jdyn W2XIjdk8UHN73QySfqpn2dkHsRhG0IWtOtwwtuGk= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109865] different results when routine moved inside the contains statement Date: Mon, 15 May 2023 18:50:52 +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: kargl at gcc dot gnu.org 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: cc 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 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to GARY.WHITE@ColoState.edu from comment #0) > Created attachment 55087 [details] > set of subroutines where moving mc11ad inside the contains statement > produces incorrect results >=20 > In the following code, when the subroutine mc11ad is moved inside the > contains statement, incorrect results are produced. Produce wrong results is meaningless as you haven't told what the correct results and wrong results are. A difference in the 7 decimal place for REAL may be entirely possible due to floating point round-off > 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','underflow' = -O3 > -funroll-loops -ffast-math=20 What happens if you remove -ffast-math and use -O0 or -O1?=