aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2016-06-11 01:58:09 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2016-06-11 01:58:09 +0200
commit95c18dd0464e8937a7caab76db490597b760c0d4 (patch)
treee9c9e6e1494685866afc1d207592584d01abe70d /gcc/ada/gcc-interface/decl.c
parentb97d37b42373ed291766a929a7dbcadf8af09884 (diff)
downloadgcc-95c18dd0464e8937a7caab76db490597b760c0d4.zip
gcc-95c18dd0464e8937a7caab76db490597b760c0d4.tar.gz
gcc-95c18dd0464e8937a7caab76db490597b760c0d4.tar.bz2
fold-const: Don't access bit fields with too big mode (PR71310)
Currently, optimize_bit_field_compare reads the bitfield in word_mode if it can. If the bit field is normally accessed in a smaller mode, this might be a violation of the memory model, although the "extra" part of the read is not used. But also, previous stores to the bit field will have been done in the smaller mode, and then bigger loads from it cause a LHS problem. PR middle-end/71310 * fold-const.c (optimize_bit_field_compare): Don't try to use word_mode unconditionally for reading the bit field, look at DECL_BIT_FIELD_REPRESENTATIVE instead. gcc/testsuite/ PR middle-end/71310 * gcc.target/powerpc/pr71310.c: New testcase. From-SVN: r237319
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
0 files changed, 0 insertions, 0 deletions