https://gcc.gnu.org/g:c70138ce8f55ea179991d59b6d525dfaf99a501b
commit r15-11723-gc70138ce8f55ea179991d59b6d525dfaf99a501b 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 5b5316524603..fed306fe59b2 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -11351,10 +11351,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. */
