Discussion:
[Patch, Fortran] PR 87172: [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782
Janus Weil
2018-09-03 19:19:17 UTC
Permalink
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
Janus Weil
2018-09-11 11:14:24 UTC
Permalink
ping!
Post by Janus Weil
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
Loading...