[PR 91832] Do not ICE on negative offsets in ipa-sra
Hi, IPA-SRA asserts that an offset obtained from get_ref_base_and_extent is non-negative (after it verifies it is based on a parameter). That assumption is invalid as the testcase shows. One could probably also write a testcase with defined behavior, but unless I see a reasonable one where the transformation is really desirable, I'd like to just punt on those cases. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2019-09-24 Martin Jambor <mjambor@suse.cz> PR ipa/91832 * ipa-sra.c (scan_expr_access): Check that offset is non-negative. testsuite/ * gcc.dg/ipa/pr91832.c: New test. From-SVN: r276093
Showing
gcc/testsuite/gcc.dg/ipa/pr91832.c
0 → 100644
Please
register
or
sign in
to comment