[Patch, fortran] PR30922 , PR30883 and PR30870 - rejects-valid bugs

Paul Richard Thomas paul.richard.thomas@gmail.com
Mon Mar 12 15:41:00 GMT 2007


I am sorry but I have messed up the numbering of the PRs here:

They should read 30922, 30879 and 30870.  I have corrected my source
ChangeLog accordingly.

Paul

On 3/12/07, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
> :ADDPATCH fortran:
>
> These three PRs have quite lightweight fixes, which are certainly
> straightforward:
>
> PR30922:
>
> This involves IMPORT and interfaces and the part in resolve.c is due
> to Tobias; to which I objected at the time:)  I was worried that by
> preventing the test for blocking of host association by same name
> symbols that this would allow host association into interfaces.
> Fortunately, there are other mechanisms that prevent this and the test
> only concerns derived types, anyway.  In addition to Tobias'
> contribution, I have added a fix in decl.c that prevents gfortran from
> compiling the only example on IMPORT in Metcalfe, Reid and Cohen.
> Interfaces, within procedures, need to access the parent namespace via
> the proc_name symbol.  The testcase is based on the reporter's
> original with fig. 18.4 from Metcalfe, Cohen and Reid.
>
> PR30870:
>
> This PR is concerned with data values in DATA statements.  gfortran is
> presently unable to use derived type components, either for the repeat
> counts or the data.  The fix uses gfc_match_rvalue and a test for
> EXPR_STRUCTURE to do the matching, before going on to try to match a
> name.  The test is the reporter's.
>
> PR30870:
>
> gfortran currently rejects a generic actual argument, even if there is
> a specific interface with the same name.  This is fixed by going
> through the generic interface to look for a specific interface with
> the same name.  If this is found, an error is not flagged.  The
> testcase is the reporter's.
>
> Bootstrapped and regtested on x86_ia64/FC5 - OK for trunk and, when
> unblocked, 4.2?
>
> Paul
>
> 2007-03-12  Tobias Burnus  <burnus@gcc.gnu.org>
>             Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/30922
>         * decl.c (gfc_match_import): If the parent of the current name-
>         space is null, try looking for an imported symbol in the parent
>         of the proc_name interface.
>         * resolve.c (resolve_fl_variable): Do not check for blocking of
>         host association by a same symbol, if the symbol is in an
>         interface body.
>
> 2007-03-12  Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/30883
>         * decl.c (match_data_constant): Before going on to try to match
>         a name, try to match a structure component.
>
>         PR fortran/30870
>         * resolve.c (resolve_actual_arglist): Do not reject a generic
>         actual argument if it has a same name specific interface.
>
> 2007-03-12  Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/30922
>         * gfortran.dg/import5.f90.f90: New test.
>
>         PR fortran/30883
>         * gfortran.dg/data_components_1.f90: New test.
>
>         PR fortran/30870
>         * gfortran.dg/generic_13.f90: New test.
>
>


-- 
Anon: "Ignorantibus veritatem dicere semper utile est."

Abraham Lincoln: "It is better to be thought a fool than to speak and
remove all doubt."



More information about the Gcc-patches mailing list