aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-02-13 11:10:57 +0100
committerRichard Biener <rguenther@suse.de>2024-02-13 13:42:02 +0100
commit94225dfb5623725fa519eac69338f7a632a509ae (patch)
treec6369fed1a1833157ede8eb92f94f18da8dafc14 /gcc/expr.cc
parentefc71fd57539421c3939b1fe7594862d0fc66cdb (diff)
downloadgcc-94225dfb5623725fa519eac69338f7a632a509ae.zip
gcc-94225dfb5623725fa519eac69338f7a632a509ae.tar.gz
gcc-94225dfb5623725fa519eac69338f7a632a509ae.tar.bz2
tree-optimization/113895 - copy_reference_ops_from_ref vs. bitfields
The recent enhancement to discover constant array indices by range info used by get_ref_base_and_extent doesn't work when the outermost component reference is to a bitfield because we track the running offset in the reference ops as bytes. The following does as ao_ref_init_from_vn_reference and recovers that manually, tracking the offset for the purpose of discovering the constant array index in bits instead. PR tree-optimization/113895 * tree-ssa-sccvn.cc (copy_reference_ops_from_ref): Track offset to discover constant array indices in bits, handle COMPONENT_REF to bitfields. * gcc.dg/torture/pr113895-1.c: New testcase.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions