https://gcc.gnu.org/g:123b6e08748c3d93a2b9501711078e163114a574
commit r16-9933-g123b6e08748c3d93a2b9501711078e163114a574 Author: Paul Thomas <[email protected]> Date: Mon Nov 9 11:04:01 2026 +0000 Fortran: trans-expr.cc:11560: 2 * always true expression [PR124975] This patch was contributed by David Binderman <[email protected]> 2026-09-11 Paul Thomas <[email protected]> gcc/fortran PR fortran/124975 * trans-expr.cc (gfc_trans_pointer_assignment): Correct logic in conditions for remap start and end resolution. (cherry picked from commit 9adb420e4826a63bf5ca7290ede553f13181252e) Diff: --- gcc/fortran/trans-expr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 2091c1331298..cd51e8068588 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -11573,10 +11573,10 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) gcc_assert (remap->u.ar.start[dim] && remap->u.ar.end[dim]); if (remap->u.ar.start[dim]->expr_type != EXPR_CONSTANT - || remap->u.ar.start[dim]->expr_type != EXPR_VARIABLE) + && remap->u.ar.start[dim]->expr_type != EXPR_VARIABLE) gfc_resolve_expr (remap->u.ar.start[dim]); if (remap->u.ar.end[dim]->expr_type != EXPR_CONSTANT - || remap->u.ar.end[dim]->expr_type != EXPR_VARIABLE) + && remap->u.ar.end[dim]->expr_type != EXPR_VARIABLE) gfc_resolve_expr (remap->u.ar.end[dim]); /* Convert declared bounds. */
