This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 87172: [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 11 Sep 2018 13:14:24 +0200
- Subject: Re: [Patch, Fortran] PR 87172: [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782
- References: <CAKwh3qhqPJ7jjZEPoBmYsYDV-twfQ0SUOeKubiaoD2cmpYP7qQ@mail.gmail.com>
ping!
Am Mo., 3. Sep. 2018 um 21:19 Uhr schrieb Janus Weil <janus@gcc.gnu.org>:
>
> Hi all,
>
> attached is a simple patch that fixes a regression which was
> introduced by one of my recent commits (spotted by Dominique).
>
> My first impulse to fix the spurious error was to check for the
> 'intrinsic' attribute, however it is actually not set (yet?) in
> resolve_fl_derived, so the next-best thing is to check for
> 'use_assoc'. That is probably even better, since it's more general.
> Obviously, if a type has the 'use_assoc' attribute, then it has been
> declared in another module, so there is no need to complain that it
> was not declared.
>
> The patch regtests cleanly on x86_64-linux-gnu. Ok for trunk?
>
> Cheers,
> Janus