https://gcc.gnu.org/g:436ac65a5429cbad7e5909ada41c2c6e514b31f4
commit 436ac65a5429cbad7e5909ada41c2c6e514b31f4 Author: Mikael Morin <[email protected]> Date: Thu Oct 15 14:16:05 2026 +0200 Correction partielle assumed_rank_25 Diff: --- gcc/fortran/trans-expr.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 995a7f60ea5f..e3b138af517e 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -7202,7 +7202,11 @@ copy_in_out_allowed (gfc_symbol *fsym, gfc_expr *e, bool nodesc_arg) return false; return !((fsym->attr.pointer && !fsym->attr.contiguous) - || (fsym->as && fsym->as->type == AS_ASSUMED_RANK)); + || (fsym->as + && fsym->as->type == AS_ASSUMED_RANK + && e->expr_type == EXPR_VARIABLE + && e->symtree->n.sym->as + && e->symtree->n.sym->as->type == AS_ASSUMED_RANK)); }
