public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 45776] (fortran) New: Full implementation of variable definition contexts (and related checks)
@ 2010-09-24 8:06 domob at gcc dot gnu.org
2010-09-24 8:10 ` [Bug 45776] (fortran) " domob at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: domob at gcc dot gnu.org @ 2010-09-24 8:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45776
Summary: Full implementation of variable definition contexts
(and related checks)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: domob@gcc.gnu.org
Since http://gcc.gnu.org/ml/fortran/2010-09/msg00397.html, there is a new
routine to check definability of variables and pointers in one place
(expr.c:gfc_check_vardef_context). This should be called from all places
mentioned in the standard as variable definition context (F2008, 16.6.7) and
pointer association context (F2008, 16.6.8).
The pointer association contexts should already be implemented, but not all
variable definition contexts. Missing are the IO related ones (items 5-10 of
the list in 16.6.7) and the ones related to co-array locks (items 14 and 15).
These should also be implemented.
For instance, the following invalid program is accepted:
module m
implicit none
integer, protected :: a
character(len=128), protected :: str
end module m
program main
use :: m
integer, parameter :: b = 42
character(len=128) :: myStr
myStr = '5'
read(myStr, *) a
read(myStr, *) b
write(str, *) 5
end program main
Note that the last line (write to internal PROTECTED variable) was also
accepted before the definability check rework.
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 45776] (fortran) Full implementation of variable definition contexts (and related checks)
2010-09-24 8:06 [Bug 45776] (fortran) New: Full implementation of variable definition contexts (and related checks) domob at gcc dot gnu.org
@ 2010-09-24 8:10 ` domob at gcc dot gnu.org
2010-09-25 16:40 ` [Bug fortran/45776] " domob at gcc dot gnu.org
2010-09-25 16:49 ` domob at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: domob at gcc dot gnu.org @ 2010-09-24 8:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45776
Daniel Kraft <domob at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.09.24 08:06:49
date| |
Ever Confirmed|0 |1
--- Comment #1 from Daniel Kraft <domob at gcc dot gnu.org> 2010-09-24 08:06:49 UTC ---
Taking this.
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/45776] Full implementation of variable definition contexts (and related checks)
2010-09-24 8:06 [Bug 45776] (fortran) New: Full implementation of variable definition contexts (and related checks) domob at gcc dot gnu.org
2010-09-24 8:10 ` [Bug 45776] (fortran) " domob at gcc dot gnu.org
@ 2010-09-25 16:40 ` domob at gcc dot gnu.org
2010-09-25 16:49 ` domob at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: domob at gcc dot gnu.org @ 2010-09-25 16:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45776
--- Comment #2 from Daniel Kraft <domob at gcc dot gnu.org> 2010-09-25 14:27:27 UTC ---
Author: domob
Date: Sat Sep 25 14:27:20 2010
New Revision: 164619
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164619
Log:
2010-09-25 Daniel Kraft <d@domob.eu>
PR fortran/45776
* gfortran.h (struct gfc_dt): New member `dt_io_kind'.
* io.c (resolve_tag): F2008 check for NEWUNIT and variable
definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
(gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
`extra_comma' with changed semantics.
(gfc_resolve_dt): Check variable definitions.
(match_io_element): Remove INTENT and PURE checks here and
initialize code->ext.dt member.
(match_io): Set dt->dt_io_kind.
(gfc_resolve_inquire): Check variable definition for all tags
except UNIT, FILE and ID.
* resolve.c (resolve_transfer): Variable definition check.
2010-09-25 Daniel Kraft <d@domob.eu>
PR fortran/45776
* gfortran.dg/io_constraints_6.f03: New test.
* gfortran.dg/io_constraints_7.f03: New test.
* gfortran.dg/newunit_2.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/io_constraints_6.f03
trunk/gcc/testsuite/gfortran.dg/io_constraints_7.f03
trunk/gcc/testsuite/gfortran.dg/newunit_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/io.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/45776] Full implementation of variable definition contexts (and related checks)
2010-09-24 8:06 [Bug 45776] (fortran) New: Full implementation of variable definition contexts (and related checks) domob at gcc dot gnu.org
2010-09-24 8:10 ` [Bug 45776] (fortran) " domob at gcc dot gnu.org
2010-09-25 16:40 ` [Bug fortran/45776] " domob at gcc dot gnu.org
@ 2010-09-25 16:49 ` domob at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: domob at gcc dot gnu.org @ 2010-09-25 16:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45776
--- Comment #3 from Daniel Kraft <domob at gcc dot gnu.org> 2010-09-25 14:30:58 UTC ---
This implemented all IO related checks (items 5-10), so only missing are now 14
and 15 which are the LOCK/UNLOCK related ones. These depend on implementation
of locks in PR 18918, so I'm waiting for that now.
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-25 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-24 8:06 [Bug 45776] (fortran) New: Full implementation of variable definition contexts (and related checks) domob at gcc dot gnu.org
2010-09-24 8:10 ` [Bug 45776] (fortran) " domob at gcc dot gnu.org
2010-09-25 16:40 ` [Bug fortran/45776] " domob at gcc dot gnu.org
2010-09-25 16:49 ` domob at gcc dot gnu.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).