From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A8713858C5E; Mon, 22 Jan 2024 00:10:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A8713858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705882229; bh=8gkFc7ew2pVOm1rtD/J19eE7fmOwR4ewREKujmghSNQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kAW/Yh24l3IlKb7vt7pEGCHIVF6hhWDKJ0/e8No9qZjLt4r8zGz5okAWM8vdpdGDu aumCbkF8XYef6FoeLx9midkeeEyitKhgQhFCu9HLh9RPDXBJpCHSI3P4eLoUoJ97EM m6LkYIWFf+KW3ot5L1k2tKfXurfNW/EXa77qy168= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/113152] Fortran 2023 half-cycle trigonometric functions Date: Mon, 22 Jan 2024 00:10:27 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl 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: 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=3D113152 --- Comment #15 from kargl at gcc dot gnu.org --- (In reply to Steve Kargl from comment #14) > On Sun, Jan 21, 2024 at 09:52:39PM +0000, anlauf at gcc dot gnu.org wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113152 > >=20 > > I think that you cannot do > >=20 > > + if (MPFR_HALF_CYCLE) > >=20 > > you really must use > >=20 > > #if MPFR_HALF_CYCLE > >=20 >=20 ... > Breakpoint 1, gfc_simplify_cospi (x=3D0x803e24b60) > at ../../gcc/gcc/fortran/simplify.cc:2085 > 2085 result =3D gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->w= here); > (gdb) n > 2101 mpfr_inits2 (2 * mpfr_get_prec (x->value.real), cs, n, r, > NULL); Good news is that your testing forced me to look at the else-{} branch again, and it exposed a shortcoming. I'm looking at a fix. So an updated patch will be necessary.=