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

--- Comment #18 from Sebastien Bardeau <bardeau at iram dot fr> ---
(In reply to kargl from comment #17)

> I just realized that your code isn't even close to conforming.
> 
> subroutine sav
>   integer :: save1
>   save1 = something wrong
> end subroutine sav
> 
> What part of "something wrong" is a valid RHS expression????

This is exactly the point: when RHS is invalid, the error message do not or did
not point this precise diagnostic, at least at the time I first reported the
problem.

> Please don't waste my time with silly code.

What do you think the user experience is with this kind of diagnostic?

bardeau ~> cat test.f90 
subroutine sav
  integer :: save1
  save1 =
sqrt(1+2+3+4+5+6+cos(0.123)**2-asin(3*exp(12)-8*dble(sin(8)+7.56/atan2(5,6)))
end subroutine sav
bardeau ~> gfortran -c test.f90 
test.f90:3:6:

    3 |   save1 =
sqrt(1+2+3+4+5+(6.1+cos(0.123)**2)-asin(3*exp(12)-8*dble(sin(8)+7.56/atan2(5,6)))
      |      1
Error: Syntax error in SAVE statement at (1)
bardeau ~>

(Tested with gfortran 9.1.0, not tested with your patch).

Reply via email to