Groups
Sign in
Groups
gg95
Conversations
About
Send feedback
Help
g95 bug, save -- module -- pure function
2 views
Skip to first unread message
Ugo
unread,
Mar 26, 2008, 7:16:36 AM
3/26/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gg95
--- Also sent to Andy, as a bug report ---
=== The code ===
$ cat g95bug.f90
module g95bug
save
integer :: i=20
contains
pure function tell_i() result (answer)
integer :: answer
answer=i
end function tell_i
end module g95bug
=== Error message ===
$ g95 -c g95bug.f90
In file g95bug.f90:3
integer :: i=20
1
Error: Variable 'i' at (1) cannot be SAVEd in a PURE procedure
=== G95 version ==
$ g95 --version
G95 (GCC 4.0.3 (g95 0.91!) Feb 26 2008)
Copyright (C) 2002-2005 Free Software Foundation, Inc.
...
Reply all
Reply to author
Forward
0 new messages