This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29657] 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:31:44 -0000
- Subject: [Bug fortran/29657] Don't allow SAVE for functions
- References: <bug-29657-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2006-10-30 19:31 -------
A fix for this specific problem is below. But one should check whether there
are other things related to procedures/subroutines/functions which are be
prohibited and should be checked. (Thus not assigning to myself.)
The patch below gives:
In file volatile.f90:8
integer, save :: a
1
Error: FUNCTION attribute conflicts with SAVE attribute at (1)
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c (Revision 118191)
+++ gcc/fortran/symbol.c (Arbeitskopie)
@@ -367,6 +367,7 @@
conf (entry, result);
conf (function, subroutine);
+ conf (function, save);
/* Cray pointer/pointee conflicts. */
conf (cray_pointer, cray_pointee);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29657