Le 31/10/2022 à 21:29, Harald Anlauf via Fortran a écrit :
Hi Mikael,

thanks a lot, your testcases broke my initial (and incorrect) patch
in multiple ways.  I understand now that the right solution is much
simpler and smaller.

I've added your testcases, see attached, with a simple scan of the
dump for the generated order of hidden arguments in the function decl
for the last testcase.

Regtested again on x86_64-pc-linux-gnu.  OK now?

Unfortunately no, the coarray case works, but the other problem remains.
The type problem is not visible in the definition of S, it is in the declaration of S's prototype in P.

S is defined as:

void s (character(kind=1)[1:_c] & restrict c, integer(kind=4) o, logical(kind=1) _o, integer(kind=8) _c)
{
...
}

but P has:

void p ()
{
static void s (character(kind=1)[1:] & restrict, integer(kind=4), integer(kind=8), logical(kind=1)); void (*<T63a>) (character(kind=1)[1:] & restrict, integer(kind=4), integer(kind=8), logical(kind=1)) pp;

  pp = s;
...
}



Reply via email to