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

--- Comment #27 from kargl at gcc dot gnu.org ---
(In reply to anlauf from comment #26)
> (In reply to kargl from comment #23)
> > (In reply to anlauf from comment #21)
> > > There's also valid code that ICEs, and invalid code that is silently
> > > accepted.
> > > 
> > > Invalid code:
> > > 
> > > program p
> > >   implicit none
> > >   integer, parameter :: b = 1
> > >   data b / 2 /
> > >   print *, b
> > > end
> > > 
> > > Instead of being rejected, this prints:
> > >            1
> > 
> > You need know about gfortran's extensions.
> > 
> > % gfcx -Wall -o z -std=f95 a.f90
> > a.f90:4:12:
> > 
> >     4 |   data b / 2 /
> >       |            1
> > Error: GNU Extension: re-initialization of 'b' at (1)
> 
> I hope you noticed the PARAMETER, which should have been caught by
> -fno-writable-parameters ... ;-)

Yes, I did.  Hopefully, you noticed the word EXTENSION.  As an 
extension, gfortran swallows the code. :-)

Reply via email to