https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113152

--- 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=113152
> > 
> > I think that you cannot do
> > 
> > +  if (MPFR_HALF_CYCLE)
> > 
> > you really must use
> > 
> > #if MPFR_HALF_CYCLE
> > 
> 

...

> Breakpoint 1, gfc_simplify_cospi (x=0x803e24b60)
>     at ../../gcc/gcc/fortran/simplify.cc:2085
> 2085      result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where);
> (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.

Reply via email to