aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-array-bounds.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-07-23 19:55:16 +0200
committerJakub Jelinek <jakub@redhat.com>2021-07-23 19:55:16 +0200
commit8408d34570c9fe9f3d22a25a76df2a4c64f08477 (patch)
tree56c44ee871ca7bc2356294cde1beea3f503b0c86 /gcc/gimple-array-bounds.h
parent435f90187eb4b6ddd66df692320057f303841ed6 (diff)
downloadgcc-8408d34570c9fe9f3d22a25a76df2a4c64f08477.zip
gcc-8408d34570c9fe9f3d22a25a76df2a4c64f08477.tar.gz
gcc-8408d34570c9fe9f3d22a25a76df2a4c64f08477.tar.bz2
expmed: Fix store_integral_bit_field [PR101562]
Our documentation says that paradoxical subregs shouldn't appear in strict_low_part: '(strict_low_part (subreg:M (reg:N R) 0))' This expression code is used in only one context: as the destination operand of a 'set' expression. In addition, the operand of this expression must be a non-paradoxical 'subreg' expression. but on the testcase below that triggers UB at runtime store_integral_bit_field emits exactly that. The following patch fixes it by ensuring the requirement is satisfied. 2021-07-23 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/101562 * expmed.c (store_integral_bit_field): Only use movstrict_optab if the operand isn't paradoxical. * gcc.c-torture/compile/pr101562.c: New test.
Diffstat (limited to 'gcc/gimple-array-bounds.h')
0 files changed, 0 insertions, 0 deletions