This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49112] Missing type-bound procedure, "duplicate save" warnings and internal compiler error
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 May 2011 17:39:17 +0000
- Subject: [Bug fortran/49112] Missing type-bound procedure, "duplicate save" warnings and internal compiler error
- Auto-submitted: auto-generated
- References: <bug-49112-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49112
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #3 from janus at gcc dot gnu.org 2011-05-22 17:26:49 UTC ---
(In reply to comment #0)
> ...:~$ gfortran -c test_gfortran_ice.f90
> test_gfortran_ice.f90:20.41:
>
> class(DateTime), intent(IN) :: dt
> 1
> Warning: Duplicate SAVE attribute specified at (1)
> test_gfortran_ice.f90:20.41:
>
> class(DateTime), intent(IN) :: dt
> 1
> Warning: Duplicate SAVE attribute specified at (1)
Here is a reduced test case for the duplicate SAVE attribute:
module datetime_mod
implicit none
save
type :: DateTime
end type
contains
character function getString (dt)
class(DateTime) :: dt
end function
end module
At first glance I would save this is invalid, and should be rejected with an
error. In particular, is it allowed to give a lonely SAVE statement? If yes,
what effect should this have? Usually SAVE is specified as an attribute for a
specific variable, right?