[Patch, fortran] PR27701 PR29232 and PR29364 - association of objects
Paul Thomas
paulthomas2@wanadoo.fr
Wed Oct 11 15:54:00 GMT 2006
:ADDPATCH fortran:
This patch fixes three problems that are quite difference, except that
they all involve association of objects,... or not:
PR27701 results from an incomplete detection of contained procedures
with the same name; two subroutines with the same name but no arguments
are still capable of passing get_proc_name because the presence of a
formal argument list was used to detect that the procedure was declared
rather than inferred. The fix uses the attributes subrouitine and
function, together with the type of interface being known.
PR29232 pertains to host association of derived types that should be
blocked by the presence of another class I object in the namespace.
This is fixed by searching for a symbol of the same name and checking if
it is the same as the host associated derived type.
PR29364 concerns derived types with derived type pointer components, for
which no derived type declaration is available. At present, gfortran
does not diagnose this at all. The existing test, implicit actual has
had to modified so that the pointer to type is declared correctly; as
required by Lahey, ifort and g95.
The testcases are modelled on the reporters'.
Regtested on AMD64/Cygwin_NT - OK for trunk?
Paul
2006-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27701
* decl.c (get_proc_name): Replace the detection of a declared
procedure by the presence of a formal argument list by the
attributes of the symbol and the presence of an explicit
interface.
PR fortran/29232
* resolve.c (resolve_fl_variable): See if the host association
of a derived type is blocked by the presence of another type I
object in the current namespace.
PR fortran/29364
* resolve.c (resolve_fl_derived): Check for the presence of
the derived type for a derived type component.
2006-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27701
* gfortran.dg/same_name_2.f90: New test.
PR fortran/29232
* gfortran.dg/host_assoc_types_1.f90: New test.
PR fortran/29364
* gfortran.dg/missing_derived_type_1.f90: New test.
* gfortran.dg/implicit_actual.f90: Comment out USE GLOBAL.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr27701.diff
Type: text/x-patch
Size: 4878 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061011/af051691/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061011/af051691/attachment.ksh>
More information about the Gcc-patches
mailing list