On 1/24/2022 7:45 AM, Richard Biener via Gcc-patches wrote:
There are a few cases where we know we're dealing with (poly-)integer
constants, so remove the use of multiple_of_p in those cases to make
the PR100499 fix less impactful.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

OK?

Thanks,
Richard.

2022-01-24  Richard Biener  <rguent...@suse.de>

        PR tree-optimization/100499
        * tree-cfg.cc (verify_gimple_assign_ternary): Use multiple_p
        on poly-ints instead of multiple_of_p.
        * tree-ssa.cc (maybe_rewrite_mem_ref_base): Likewise.
        (non_rewritable_mem_ref_base): Likewise.
        (non_rewritable_lvalue_p): Likewise.
        (execute_update_addresses_taken): Likewise.
So it's not a full fix for this class of problems, but removes some of the cases where we could potentially overflow and give the wrong result.  I'd be happier if we had a concrete testcase for these instances you're fixing, but I think it's a move in the right direction and I obviously trust your judgment on whether or not to install it now or wait for gcc-13.

So your call.  Both on whether or not to try and construct testcases to trigger these instances and whether or not to install now or wait for gcc-13.

jeff

Reply via email to