https://gcc.gnu.org/g:d0ff10a005eed4ca47d05bc0a93b3daf643025cb
commit r16-4712-gd0ff10a005eed4ca47d05bc0a93b3daf643025cb Author: Yuao Ma <[email protected]> Date: Wed Oct 29 23:40:18 2025 +0800 fortran: remove redundant code related to constant pointer This part is unreachable after r16-4474-g2c1949bf152f8f. gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_gfc_desc_to_cfi_desc): Remove unreachable code. Diff: --- gcc/fortran/trans-expr.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 67b60c78aa75..2e88e65b6b87 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -6090,9 +6090,6 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) se.want_pointer = 1; gfc_conv_expr (&se, e); gfc = se.expr; - /* gfc_conv_constant ignores se.want_poiner, e.g. for string_cst. */ - if (!POINTER_TYPE_P (TREE_TYPE (gfc))) - gfc = gfc_build_addr_expr (NULL, gfc); } else {
