https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78661

--- Comment #13 from paul.richard.thomas at gmail dot com <paul.richard.thomas 
at gmail dot com> ---
Hi Janus,

Why do you think that both input and output is required?

How is namelist supposed to work with classes? Just with the declared type?

Cheers

Paul

On 17 December 2016 at 15:23, janus at gcc dot gnu.org
<gcc-bugzi...@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78661
>
> --- Comment #6 from janus at gcc dot gnu.org ---
> (In reply to janus from comment #5)
>> Btw, this variant is wrongly rejected:
>>
>> [..]
>>
>>    NAMELIST /nml/ x
>>                1
>> Error: NAMELIST object ‘x’ in namelist ‘nml’ at (1) is polymorphic and
>> requires a defined input/output procedure
>
> Sorry, false alarm. In principle the error message is correct, although the
> wording is maybe a bit off: Both an input *and* output procedure is required!
>
> I'd suggest this change:
>
> Index: gcc/fortran/resolve.c
> ===================================================================
> --- gcc/fortran/resolve.c       (revision 243773)
> +++ gcc/fortran/resolve.c       (working copy)
> @@ -13871,8 +13871,8 @@ resolve_fl_namelist (gfc_symbol *sym)
>        if (nl->sym->ts.type == BT_CLASS && !dtio)
>         {
>           gfc_error ("NAMELIST object %qs in namelist %qs at %L is "
> -                    "polymorphic and requires a defined input/output "
> -                    "procedure", nl->sym->name, sym->name, 
> &sym->declared_at);
> +                    "polymorphic and requires defined input and output "
> +                    "procedures", nl->sym->name, sym->name,
> &sym->declared_at);
>           return false;
>         }
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

Reply via email to