aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-01-05 10:45:26 +0100
committerJakub Jelinek <jakub@redhat.com>2022-01-05 10:45:26 +0100
commita4c2e62d60f47d47cdd94951e16b0de50495cdab (patch)
treeb9cc67bf30b21cd6ad4cff43af9b193c52e8f4ec /gcc/ada
parent4ce3bd7993bc8413197e07c4f54052e4ecaeccaa (diff)
downloadgcc-a4c2e62d60f47d47cdd94951e16b0de50495cdab.zip
gcc-a4c2e62d60f47d47cdd94951e16b0de50495cdab.tar.gz
gcc-a4c2e62d60f47d47cdd94951e16b0de50495cdab.tar.bz2
gimple-fold: Remove incorrect folding of debug stmts [PR103691]
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 can transform # DEBUG D.4293 => &a[0] into # DEBUG D.4293 => &2.0e+0 etc., all we want to allow are the lhs folding of the operand which maybe_fold_reference no longer does since r12-21-g0bf8cd9d5e8ac. 2022-01-05 Jakub Jelinek <jakub@redhat.com> PR fortran/103691 * gimple-fold.c (fold_stmt_1): Don't call maybe_fold_reference for DEBUG stmts with ADDR_EXPR gimple_debug_bind_get_value, it can do unwanted rhs folding like &a[0] into &2.0 etc. * gfortran.dg/pr103691.f90: New test.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions