[Bug fortran/125747] ICE in gfc_add_modify_loc, at fortran/trans.cc:229 since r16-5177
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 11 21:23:04 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125747
--- Comment #8 from Steve Kargl <kargl at gcc dot gnu.org> ---
(In reply to Harald Anlauf from comment #7)
> (In reply to Steve Kargl from comment #6)
> > (In reply to Harald Anlauf from comment #4)
> > >
> > > I think we should not allow this extension for modern DO constructs.
> > >
> >
> > I think it should be disallowed in FORALL as well. The error
> > message in resolve.cc(gfc_resolve_iterator) is guarded with
> > gfc_notify_std (GFC_STD_F95_DEL...). F95 never allowed REAL
> > iterators and FORALL was introduced in this standard.
> >
> > F95, p.114
> >
> > R750 forall-triplet-spec is index-name = subscript : subscript [ : stride]
> > R617 subscript is scalar-int-expr
> > R603 stride is scalar-int-expr
> >
> > If it breaks code in the wild, so what? The code was never correct.
>
> +1
>
> When I specify -std=f2023,
>
> do j = 1, 0.3
> end do
gfortran had to accept this one due to f66/f77/g77 compatibility.
I had a hand in getting that to work. With -std=f2023, one gets
the error, without -std=f2023 a warning is issues, and with
-std=legacy it's silently accepted.
> is already rejected, and
>
> forall (j = 1:0.3)
> end forall
>
> anyway. So it is actually a regression...
More information about the Gcc-bugs
mailing list