This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR fortran/77978 -- STOP code fixes


On Fri, Oct 14, 2016 at 05:24:53PM -0700, Steve Kargl wrote:
> For the code 
> 
>   program foo
>     stop merge(667, 668, .true.)
>   end 
> 
> gfortran with either -std=f95 or -std=f2003 should reject 
> this code.  My patch does not fix this issue, because it
> would (1) require a complete rewrite of gfc_match_stopcode
> (which I am not willing to do) and (2) it simply is a vastly
> unimportant corner case that gives the desired behavior.
> 

I take it back.  It is sort of accidently fixed with a
completely unintelligent error for -std=f95.  It is
accepted for -std=f2003.  Either way I have no intention
of fixing this usage.

troutmask:sgk[492] gfc7 -c -std=f2003 a.f90
troutmask:sgk[493] gfc7 -c -std=f95 a.f90
a.f90:2:6:

   stop merge(667,668,.true.)
      1
Error: Fortran 2003: Elemental function as initialization expression
with non-integer/non-character arguments at (1)


-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]