public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function
@ 2008-04-05 21:55 burnus at gcc dot gnu dot org
2008-04-05 22:58 ` [Bug fortran/35837] " dfranke at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-04-05 21:55 UTC (permalink / raw)
To: gcc-bugs
Found this at
http://groups.google.com/group/gg95/browse_thread/thread/667fe259fb346773
I think the reporter is right that this program is valid. NAG f95 and ifort
accept is without error.
g95 and gfortran reject it with:
Error: SAVE attribute at (1) cannot be specified in a PURE procedure
module g95bug
save
integer :: i=20
contains
pure function tell_i() result (answer)
integer :: answer
answer=i
end function tell_i
end module g95bug
--
Summary: rej.valid: Host-associated SAVEd variable and PURE
function
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
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=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35837] rej.valid: Host-associated SAVEd variable and PURE function
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
@ 2008-04-05 22:58 ` dfranke at gcc dot gnu dot org
2008-09-05 12:50 ` domob at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-04-05 22:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dfranke at gcc dot gnu dot org 2008-04-05 22:57 -------
F95, section 12.6 "Pure procedures":
Constraint: In a pure subprogram any variable which is in common or accessed
by host or use association, is a dummy argument to a pure function, is a dummy
argument with INTENT (IN) to a pure subroutine, or an object that is storage
associated with any such variable, shall not be used in the following contexts:
(1) As the variable of an assignment-stmt;
(2) As a DO variable or implied DO variable;
(3) As an input-item in a read-stmt from an internal file;
(4) As an internal-file-unit in a write-stmt;
(5) As an IOSTAT= specifier in an input or output statement with
an
internal file;
(6) As the pointer-object of a pointer-assignment-stmt;
(7) As the target of a pointer-assignment-stmt;
(8) As the expr of an assignment-stmt in which the variable is of a
derived type if the derived type has a pointer component at any
level of component selection;
(9) As an allocate-object or stat-variable in an allocate-stmt or
deallocate-stmt, or as a pointer-object in a nullify-stmt; or
(10) As an actual argument associated with a dummy argument with INTENT
(OUT) or INTENT (INOUT) or with the POINTER attribute.
Thus, the case shown above should be valid.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-04-05 22:57:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35837] rej.valid: Host-associated SAVEd variable and PURE function
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
2008-04-05 22:58 ` [Bug fortran/35837] " dfranke at gcc dot gnu dot org
@ 2008-09-05 12:50 ` domob at gcc dot gnu dot org
2008-09-05 20:54 ` domob at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2008-09-05 12:50 UTC (permalink / raw)
To: gcc-bugs
--
domob at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |domob at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-04-05 22:57:37 |2008-09-05 12:48:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35837] rej.valid: Host-associated SAVEd variable and PURE function
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
2008-04-05 22:58 ` [Bug fortran/35837] " dfranke at gcc dot gnu dot org
2008-09-05 12:50 ` domob at gcc dot gnu dot org
@ 2008-09-05 20:54 ` domob at gcc dot gnu dot org
2008-09-05 20:56 ` domob at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2008-09-05 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from domob at gcc dot gnu dot org 2008-09-05 20:53 -------
Subject: Bug 35837
Author: domob
Date: Fri Sep 5 20:51:50 2008
New Revision: 140046
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140046
Log:
2008-09-05 Daniel Kraft <d@domob.eu>
PR fortran/35837
* resolve.c (resolve_types): Restore gfc_current_ns on exit.
* symbol.c (gfc_save_all): Removed blank line.
2008-09-05 Daniel Kraft <d@domob.eu>
PR fortran/35837
* gfortran.dg/save_3.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/save_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35837] rej.valid: Host-associated SAVEd variable and PURE function
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-09-05 20:54 ` domob at gcc dot gnu dot org
@ 2008-09-05 20:56 ` domob at gcc dot gnu dot org
2008-09-09 9:28 ` domob at gcc dot gnu dot org
2008-09-09 9:29 ` domob at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2008-09-05 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from domob at gcc dot gnu dot org 2008-09-05 20:55 -------
Fixed for trunk.
--
domob at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35837] rej.valid: Host-associated SAVEd variable and PURE function
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-09-05 20:56 ` domob at gcc dot gnu dot org
@ 2008-09-09 9:28 ` domob at gcc dot gnu dot org
2008-09-09 9:29 ` domob at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2008-09-09 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from domob at gcc dot gnu dot org 2008-09-09 09:26 -------
Subject: Bug 35837
Author: domob
Date: Tue Sep 9 09:25:33 2008
New Revision: 140140
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140140
Log:
2008-09-05 Daniel Kraft <d@domob.eu>
PR fortran/35837
* gfortran.dg/save_3.f90: New test.
2008-09-05 Daniel Kraft <d@domob.eu>
PR fortran/35837
* resolve.c (resolve_types): Restore gfc_current_ns on exit.
* symbol.c (gfc_save_all): Removed blank line.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/save_3.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/resolve.c
branches/gcc-4_3-branch/gcc/fortran/symbol.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35837] rej.valid: Host-associated SAVEd variable and PURE function
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-09-09 9:28 ` domob at gcc dot gnu dot org
@ 2008-09-09 9:29 ` domob at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: domob at gcc dot gnu dot org @ 2008-09-09 9:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from domob at gcc dot gnu dot org 2008-09-09 09:27 -------
Fixed for 4.3 branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35837
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-09 9:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-05 21:55 [Bug fortran/35837] New: rej.valid: Host-associated SAVEd variable and PURE function burnus at gcc dot gnu dot org
2008-04-05 22:58 ` [Bug fortran/35837] " dfranke at gcc dot gnu dot org
2008-09-05 12:50 ` domob at gcc dot gnu dot org
2008-09-05 20:54 ` domob at gcc dot gnu dot org
2008-09-05 20:56 ` domob at gcc dot gnu dot org
2008-09-09 9:28 ` domob at gcc dot gnu dot org
2008-09-09 9:29 ` domob at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).