re PR fortran/45776 (Full implementation of variable definition contexts (and related...
authorDaniel Kraft <d@domob.eu>
Sat, 25 Sep 2010 14:27:20 +0000 (16:27 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Sat, 25 Sep 2010 14:27:20 +0000 (16:27 +0200)
commit8e8dc0603560c94f84c0061f3040d8f2654f8036
tree545accb9fd475dcf562501179762b5ef130d655c
parentc21136eebbf57975d027b64730703553fcbc1b09
re PR fortran/45776 (Full implementation of variable definition contexts (and related checks))

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.

From-SVN: r164619
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/io.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/io_constraints_6.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/io_constraints_7.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/newunit_2.f90 [new file with mode: 0644]