[Bug fortran/59537] "An automatic object shall not have the SAVE attribute." is not diagnosed.
bugs at stellardeath dot org
gcc-bugzilla@gcc.gnu.org
Sat Mar 22 23:28:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59537
--- Comment #4 from Lorenz Hüdepohl <bugs at stellardeath dot org> ---
> From the above gfortran is right to reject the code with initialization.
>
> > Without the SAVE statement it compiles fine.
>
> From the above (C513) this is a bug, the code should give an error without/with -finit-*.
I guess my point is, that I do _not_ specify
real, save :: a(1:n)
which would be illegal, but merely
real :: a(1:n)
save
in which case the "SAVE" statement should apply to all variables to which it
can apply - that is _not_ to the automatic dummy argument "a".
Nonetheless, code that compiles without -finit-real should also compile with
-finit-real, right?
More information about the Gcc-bugs
mailing list