[Bug fortran/68568] ICE with automatic character object and save, in combination with some options
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Nov 26 20:34:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68568
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
As already known, this works without an error :
(A SAVE statement without a saved entity list is treated as though
it contained the names of all allowed items in the same scoping unit.)
$ gfortran -g -O0 -Wall -fcheck=all -c z1a.f90
And this is detected :
(The SAVE attribute shall not be specified for an automatic data object.)
$ cat z1b.f90
subroutine s(n)
integer, intent(in) :: n
character(n), save :: x
x = 'a'
end
$ gfortran -g -O0 -Wall -fcheck=all -c z1b.f90
z1b.f90:3:26:
character(n), save :: x
1
Error: Automatic object 'x' at (1) cannot have the SAVE attribute
More information about the Gcc-bugs
mailing list