]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/106934 - avoid BIT_FIELD_REF of bitfields
authorRichard Biener <rguenther@suse.de>
Wed, 14 Sep 2022 07:00:35 +0000 (09:00 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 11 Oct 2022 11:25:05 +0000 (13:25 +0200)
commitc3119f575a04845fbbebbf90b5cdea88d5d76156
tree13d92c5b8326a72f3e483334e74383b3a20dd5d9
parente364e27b6636ba09755790358910f199d07194b3
tree-optimization/106934 - avoid BIT_FIELD_REF of bitfields

The following avoids creating BIT_FIELD_REF of bitfields in
update-address-taken.  The patch doesn't implement punning to
a full precision integer type but leaves a comment according to
that.

PR tree-optimization/106934
* tree-ssa.cc (non_rewritable_mem_ref_base): Avoid BIT_FIELD_REFs
of bitfields.
(maybe_rewrite_mem_ref_base): Likewise.

* gfortran.dg/pr106934.f90: New testcase.

(cherry picked from commit 05f5c42cb42c5088187d44cc45a5f671d19ad8c5)
gcc/testsuite/gfortran.dg/pr106934.f90 [new file with mode: 0644]
gcc/tree-ssa.cc