kargl at gcc dot changed:

           What    |Removed                     |Added
                 CC|                            |kargl at gcc dot

--- Comment #2 from kargl at gcc dot ---
(In reply to john.harper from comment #0)
> Stop codes changed from the f2003 standard to f2008. The first of these 2 
> programs has a stop code valid in f2003 but not in f2008, the second has a
> stop code valid in f2008 but not in f2003. But gfortran 6.1.1 happily
> compiles and runs both programs with either -std=f2003 or -f2008.
> Here are the program listings, gfortran -v result, and the results of
> compiling with the -std options that should not have worked:
> cayley[~/Jfh] % cat stopnumber.f90
> ! stop666 (no space before 666) is valid f95 or f2003 but bad f2008
>   implicit none
>   stop666
> end program
> cayley[~/Jfh] % cat stopnumber2.f90
> ! stop expression is valid f2008 but bad f2003
>   implicit none                                                             

It actually worse than it appears.

% gfc7 -o z -std=f95 a.f90
% ./z
STOP -666666
% cat a.f90
  implicit none
  stop -666666
end program
% vi a.f90 (remove minus sign)
% gfc7 -o z -std=f95 a.f90
% ./z
STOP 666666

Reply via email to