https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104321
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- I think it is not only dead code but it should be also removed: Glancing at the code, the 'data = NULL;' does not make sense (cf. 'memcpy(lhs, rhs)' above, lhs is data+offset) – and also does not match the comment. Besides, all testcases seem to be happy with that line being dead code Thus, I think the following is the right solution: diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc index 6493cc2f6b1..45ba440c1db 100644 --- a/gcc/fortran/trans-decl.cc +++ b/gcc/fortran/trans-decl.cc @@ -7107,5 +7107,2 @@ gfc_conv_cfi_to_gfc (stmtblock_t *init, stmtblock_t *finally, /* if (cond) { block2 } */ - tmp = fold_build2_loc (input_location, MODIFY_EXPR, void_type_node, - data, fold_convert (TREE_TYPE (data), - null_pointer_node)); tmp = build3_v (COND_EXPR, cond_var, gfc_finish_block (&block2),