[Patch, fortran] PR87127 - External function not recognised from within an associate block

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Patch, fortran] PR87127 - External function not recognised from within an associate block

Paul Richard Thomas
This patch is pretty self-explanatory. I have checked that a sensible
errors are given if 'exfunc' in the testcase is referenced if it is a
variable.

Bootstrapped and regtested on FC29/x86_64 - OK for trunk?

Paul

2019-03-30  Paul Thomas  <[hidden email]>

    PR fortran/87127
    * resolve.c (check_host_association): If an external function
    is typed but not declared explicitly to be external, change the
    old symbol from a variable to an external function.

2019-03-30  Paul Thomas  <[hidden email]>

    PR fortran/87127
    * gfortran.dg/external_procedures_4.f90: New test.

submit.diff (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Patch, fortran] PR87127 - External function not recognised from within an associate block

Dominique d'Humières-2
Hi Paul,

With your patch the error for the test gfortran.dg/pr88376.f90 is changed from

Error: 'n' at (1) is not a function

to

Error: Specification function 'n' at (1) must be PURE

TIA

Dominique
Reply | Threaded
Open this post in threaded view
|

Re: [Patch, fortran] PR87127 - External function not recognised from within an associate block

Paul Richard Thomas
Hi Dominique,

I discovered the same thing myself this morning. The patch was
developed on 8-branch because my working trunk had a hefty patch in an
intermediate state of development. I cleared it off,ready to do the
commit, and discovered the change on regtesting. I am trying to think
of a way in which to distinguish the two cases.

Thanks

Paul

On Sun, 31 Mar 2019 at 10:33, Dominique d'Humières <[hidden email]> wrote:

>
> Hi Paul,
>
> With your patch the error for the test gfortran.dg/pr88376.f90 is changed from
>
> Error: 'n' at (1) is not a function
>
> to
>
> Error: Specification function 'n' at (1) must be PURE
>
> TIA
>
> Dominique



--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein