Hi! A static analyzer found what seems like a pasto in the PR45019 changes, the second branch of || only accesses sym2 while the first one sym1 except for this one spot.
Not sure I'm able to construct a testcase for this though. In any case, bootstrapped/regtested on x86_64-linux and i686-linux successfully, ok for trunk? 2024-08-01 Jakub Jelinek <ja...@redhat.com> * dependency.cc (gfc_check_dependency): Fix a pasto, check sym1->as->type for AS_ASSUMED_SHAPE rather than sym2->as->type. Formatting fix. --- gcc/fortran/dependency.cc.jj 2024-07-01 11:28:22.705237968 +0200 +++ gcc/fortran/dependency.cc 2024-07-31 20:53:34.471588828 +0200 @@ -1368,7 +1368,7 @@ gfc_check_dependency (gfc_expr *expr1, g if ((attr1.pointer || attr1.target) && (attr2.pointer || attr2.target)) { if (check_data_pointer_types (expr1, expr2) - && check_data_pointer_types (expr2, expr1)) + && check_data_pointer_types (expr2, expr1)) return 0; return 1; @@ -1380,7 +1380,7 @@ gfc_check_dependency (gfc_expr *expr1, g if (sym1->attr.target && sym2->attr.target && ((sym1->attr.dummy && !sym1->attr.contiguous && (!sym1->attr.dimension - || sym2->as->type == AS_ASSUMED_SHAPE)) + || sym1->as->type == AS_ASSUMED_SHAPE)) || (sym2->attr.dummy && !sym2->attr.contiguous && (!sym2->attr.dimension || sym2->as->type == AS_ASSUMED_SHAPE)))) Jakub