Re: [PATCH] gimple-fold: Remove incorrect folding of debug stmts [PR103691]

2022-01-05 Thread Richard Biener via Gcc-patches
On Wed, 5 Jan 2022, Jakub Jelinek wrote: > Hi! > > For ADDR_EXPR gimple_debug_bind_get_value fold_stmt_1 uses > maybe_canonicalize_mem_ref_addr earlier and I think that should > resolve the concerns raised in PR52329. But folding ADDR_EXPR > operand using maybe_fold_reference and then taking add

[PATCH] gimple-fold: Remove incorrect folding of debug stmts [PR103691]

2022-01-05 Thread Jakub Jelinek via Gcc-patches
Hi! For ADDR_EXPR gimple_debug_bind_get_value fold_stmt_1 uses maybe_canonicalize_mem_ref_addr earlier and I think that should resolve the concerns raised in PR52329. But folding ADDR_EXPR operand using maybe_fold_reference and then taking address of that looks like an invalid transformation, it