]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/37423 (Fortran 2003: DEFERRED bindings not yet implemented)
authorDaniel Kraft <d@domob.eu>
Sun, 29 Mar 2009 17:47:00 +0000 (19:47 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Sun, 29 Mar 2009 17:47:00 +0000 (19:47 +0200)
commitb0e5fa9401bbcb065adc9a79c0bda071d712491d
tree35f65c6aad1726518da105f2c369fcb510dd32a0
parent0340f2ba6e7a3dd55135da0254c72eb3b47de802
re PR fortran/37423 (Fortran 2003: DEFERRED bindings not yet implemented)

2009-03-29  Daniel Kraft  <d@domob.eu>

PR fortran/37423
* gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
added a comment explaining DEFERRED binding handling.
* decl.c (match_binding_attributes): Really match DEFERRED attribute.
(match_procedure_in_type): Really match PROCEDURE(interface) syntax
and do some validity checks for DEFERRED and this construct.
* module.c (binding_overriding): New string constant for DEFERRED.
(mio_typebound_proc): Module-IO DEFERRED flag.
* resolve.c (check_typebound_override): Ensure that a non-DEFERRED
binding is not overridden by a DEFERRED one.
(resolve_typebound_procedure): Allow abstract interfaces as targets
for DEFERRED bindings.
(ensure_not_abstract_walker), (ensure_not_abstract): New methods.
(resolve_fl_derived): Use new `ensure_not_abstract' method for
non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
binding is overridden.
(check_typebound_baseobject): New method.
(resolve_compcall), (resolve_typebound_call): Check base-object of
the type-bound procedure call.
* gfc-internals.texi (Type-bound procedures): Document a little bit
about internal handling of DEFERRED bindings.

2009-03-29  Daniel Kraft  <d@domob.eu>

PR fortran/37423
* gfortran.dg/typebound_proc_4.f03: Remove not-implemented check for
DEFERRED bindings.
* gfortran.dg/typebound_proc_9.f03: New test.
* gfortran.dg/typebound_proc_10.f03: New test.
* gfortran.dg/typebound_proc_11.f03: New test.
* gfortran.dg/abstract_type_5.f03: New test.

From-SVN: r145248
12 files changed:
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/gfc-internals.texi
gcc/fortran/gfortran.h
gcc/fortran/module.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/abstract_type_5.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/typebound_proc_10.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/typebound_proc_11.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/typebound_proc_4.f03
gcc/testsuite/gfortran.dg/typebound_proc_9.f03 [new file with mode: 0644]