[Bug fortran/104321] Dead code since r12-4467-g64f9623765da33
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104321 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED CC||anlauf at gcc dot gnu.org Status|NEW |RESOLVED --- Comment #4 from anlauf at gcc dot gnu.org --- Fixed.
[Bug fortran/104321] Dead code since r12-4467-g64f9623765da33
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104321 --- Comment #3 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:b5fce899dbbd7246d003209b2fe3b04f8738 commit r13-6862-gb5fce899dbbd7246d003209b2fe3b04f8738 Author: Harald Anlauf Date: Sat Mar 25 19:59:45 2023 +0100 Fortran: remove dead code [PR104321] gcc/fortran/ChangeLog: PR fortran/104321 * trans-decl.cc (gfc_conv_cfi_to_gfc): Remove dead code.
[Bug fortran/104321] Dead code since r12-4467-g64f9623765da33
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104321 --- Comment #2 from anlauf at gcc dot gnu.org --- (In reply to Tobias Burnus from comment #1) > 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 So we can just remove this dead code as obvious and finally close the PR?
[Bug fortran/104321] Dead code since r12-4467-g64f9623765da33
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104321 --- Comment #1 from Tobias Burnus --- 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 (),
[Bug fortran/104321] Dead code since r12-4467-g64f9623765da33
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104321 Martin Liška changed: What|Removed |Added Last reconfirmed||2022-02-01 Status|UNCONFIRMED |NEW Ever confirmed|0 |1