This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29657] New: Don't allow SAVE for functions
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2006 19:13:29 -0000
- Subject: [Bug fortran/29657] New: Don't allow SAVE for functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gfortran happily accepts the SAVE attribute for function (procedure attributes)
function sq(x)
real, intent(in) :: x
real, save :: sq ! SAVE is wrong!
sq = x**2
end function sq
g95:
Error: PROCEDURE attribute conflicts with SAVE attribute at (1)
sunf95:
ERROR: "SQ" is a function, therefore it must not be declared with the SAVE
attribute.
ifort:
The SAVE attribute conflicts with other declarations.
NAG f95:
Cannot SAVE procedure SQ
--
Summary: Don't allow SAVE for functions
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid, diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29657