This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: Re: [Patch, fortran] PR37445 - Host-associated proc not found if same-name generic is use-associated]

[typo in in the email address: gcc-patch(es)]
--- Begin Message ---

Paul Thomas wrote: 
> The regression is now fixed in the attached.  The original patch
> failed to check if the new subroutine symbol is really contained in
> the current namespace.  Once the extra line is added, Norman's
> original 80 file source code compiles correctly.... or it compiles, at
> least:-)
Thanks! That's great.

> The patch also contains a proposal for PR35769 - I have no fixed
> thoughts on this other than that it might be excessively difficult to
> fix it properly. If this does not immediately seem good, forget it:-)

I think it is good (enough). I'm not sure whether the warning is clear:

Warning: The FORALL with index 'j2' might cause more than one assignment
to this object at (1)

ifort has:
warning #6696: All active combinations of index-names are not used
within the variable being defined (i.e., leftside) of this
assignment-stmt.   [LDA]
(Note: ifort miscompiles the program with -O2.)

g95 has:
Error: Left side of assignment at (1) in FORALL block must contain the
'j2' iterator
(note: Error is wrong)

I'm not sure whether one can improve the wording; I like g95's one
(without "must") a bit more. One could combine them, e.g to

"Warning: The FORALL with index 'j2' is not used on the left side of the
assignment at (1) which might cause more than one assignment to this object"

which has the disadvantage of being lengthy.

> Bootstrapped and regtested on FC9/x86_i64 - OK for trunk and, after a
> week, for 4.3?

          /* If one of the FORALL index variables doesn't appear in the
             assignment target, then there will be a many-to-one
             assignment.  */
          if (find_forall_index (code->expr, forall_index, 0) == FAILURE)
            gfc_warning ("The FORALL with index '%s' might cause more than "
                         "one assignment to this object at %L",
                         var_expr[n]->symtree->name, &code->expr->where);

a) In the comment s/will be/might be/
b) Maybe you can come up with a slightly clearer warning message.

Otherwise: OK. Thanks for the patch.


--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]