[Patch, fortran] PR30878 - Rejects function f1; namelist /nml/ f1
Paul Richard Thomas
paul.richard.thomas@gmail.com
Wed May 9 07:51:00 GMT 2007
Duuuh!
On 5/9/07, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
> :ADDPATCH fortran:
>
> This PR comes about because gfortran throws an error upon an implicit
> result variable appearing in a namelist. The patch consists of two
> steps: (i) Prevent the emission of the compilation error in symbol.c
> and resolve.c; and (ii) Add the requisite code to trans-io.c. The
> comments and the ChangeLogs are sufficiently descriptive to follow
> what is going on. The testcase is a mutilation of the reporter's.
>
> Bootstrapped and regtested on x86_ia64 - OK for trunk?
>
> Paul
>
> PS At the time of my first contribution to gfortran, the testsuite
> contain two testcases for NAMELIST. There are now 33 of the
> blighters. Please accept my apologies:)
>
> 2007-05-09 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/30878
> * resolve.c (resolve_fl_namelist): It is not an error if the
> namelist element is the result variable of the enclosing
> function. Search for the symbol in current and all parent
> namespaces for a potential conflict.
> * symbol.c (check_conflict): Remove the conflict between
> 'in_namelist' and 'FL_PROCEDURE' because the symbol info
> is not available to exclude function result variables.
> * trans-io.c (nml_get_addr_expr): Use the fake result decl
> if the symbol is an implicit result variable.
>
> 2007-05-09 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/30878
> * gfortran.dg/namelist_29.f90: New test.
>
--
"Success is the ability to go from one failure to another with no loss
of enthusiasm." - Winston Churchill
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr30878.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070509/f4221be1/attachment.ksh>
More information about the Fortran
mailing list