https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120140
--- Comment #12 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #11)
> Err, it's actually the expected outcome, isn't it?
> Maybe the patch is correct after all.
At least even the corrected testcase from comment#0 works, as my other tests.
Thanks!
> I'm confused, the logic seems reversed in gfc_check_*_dependency.
> According to the comment of gfc_check_argument_var_dependency, 'true' means
> no dependency (and same for gfc_check_argument_dependency and
> check_fncall_dependency), but gfc_check_fncall_dependency does:
>
> for (; actual; actual = actual->next, formal = formal ? formal->next :
> NULL)
> {
> ...
> if (gfc_check_argument_dependency (other, intent, expr, elemental))
> return 1;
> }
> return 0
>
> So no dependency if only one argument has no dependency?
I'll have a look.
> Additionally, gfc_check_dependency returns 'true' if there is a dependency
> and if it returns true, then gfc_check_argument_var_dependency may return
> true, which means no dependency as said above.
>
> I will stop here, I must be missing something obvious, this is mostly
> working isn't it?
Apparently so, but I'll check the logic you pointed to.