On 11/8/26 6:58 PM, Jerry D wrote:
On 11/8/26 2:07 AM, Mikael Morin wrote:
Le 08/11/2026 à 10:15, Thomas Koenig a écrit :
Hi,

debugging a regression on a patch, I just stumbled across a
symbol with addr.flavor = FL_PARAMETER and attr.dummy = 1, which
IMHO makes less than zero sense.

This apparently comes from, in coarray.cc,

#define ADD_ARG(name, nsym, stype, skind, sintent)                             \
   gfc_get_symbol (name, sub_ns, &nsym);                                        \    nsym->ts.type = stype;                                                       \    nsym->ts.kind = skind;                                                       \    nsym->attr.flavor = FL_PARAMETER;                                            \    nsym->attr.dummy = 1;                                                        \    nsym->attr.intent = sintent;                                                 \    nsym->declared_at = expr-  >where;                                             \    gfc_set_sym_referenced (nsym);                                               \    *argptr = gfc_get_formal_arglist ();                                         \    (*argptr)->sym = nsym;                                                       \

However, I'm not into coarray code, so there may be some hidden meaning
to it after all.

Comments?.
This could have been written by a person knowing less the fortran world than the C or middle-end world, where "parameter" means procedure argument.


Best regards

     Thomas


Nice catch Thomas!

It needs to change to FL_VARIABLE in four places.  This wiggles on one test case so it is adjusted.

See attached trivial patch.

I will commit this tomorrow.

Regression tested on x86_64 -m32 and -m64

Cheers,

Jerry


Committed:

commit 122212d2fd6bc9547bb5280ae2f0bef20990f749 (HEAD -> master, origin/master, origin/HEAD)
Author: Jerry DeLisle <[email protected]>
Date:   Sun Nov 8 18:46:13 2026 -0800

    fortran: Make coarray accessor dummy arguments variables

--- snip ---

Reply via email to