diff options
author | Richard Biener <rguenther@suse.de> | 2023-04-24 13:20:25 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-04-27 10:36:20 +0200 |
commit | 7bcdcf86e8272eeb524cc1dcb0ada8c8cfe6f27e (patch) | |
tree | a6c335bd2e04de100d89e5bdd22822f8e45afa56 /gcc/value-range.h | |
parent | d94ca762f6e0e4f117c1a61aa6d6613b2abc1216 (diff) | |
download | gcc-7bcdcf86e8272eeb524cc1dcb0ada8c8cfe6f27e.zip gcc-7bcdcf86e8272eeb524cc1dcb0ada8c8cfe6f27e.tar.gz gcc-7bcdcf86e8272eeb524cc1dcb0ada8c8cfe6f27e.tar.bz2 |
tree-optimization/109594 - wrong register promotion
We fail to verify the constraints under which we allow handled
components to wrap registers. The gcc.dg/pr70022.c testcase shows
that we happily end up with
_2 = VIEW_CONVERT_EXPR<int[4]>(v_1(D))
as produced by SSA rewrite and update_address_taken. But the intent
was that we wrap registers with at most a single level of handled
components and specifically only allow __real, __imag, BIT_FIELD_REF
and VIEW_CONVERT_EXPR on them, but not ARRAY_REF or COMPONENT_REF.
Together with the improved gimple_load predicate taking advantage
of the above and ASAN this eventually ICEd.
The following fixes update_address_taken as to this constraint.
PR tree-optimization/109594
* tree-ssa.cc (non_rewritable_mem_ref_base): Constrain
what we rewrite to a register based on the above.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions