[Patch, Fortran] PR 87172: [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782

Janus Weil janus@gcc.gnu.org
Mon Sep 3 19:19:00 GMT 2018


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr87172.diff
Type: text/x-patch
Size: 1948 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20180903/dbcf9274/attachment.bin>


More information about the Fortran mailing list