aboutsummaryrefslogtreecommitdiff
path: root/libitm
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-03-13 10:19:04 +0100
committerJakub Jelinek <jakub@redhat.com>2024-03-13 10:19:04 +0100
commit0613b12dd7f6274a1aac07f295ed51d86c2c85f1 (patch)
treeee3fb3b9b2b42af34e51c8c3f8d0a0932fedc1d5 /libitm
parentc5037fcee2de438774466e78e46e6ab4df72a7fe (diff)
downloadgcc-0613b12dd7f6274a1aac07f295ed51d86c2c85f1.zip
gcc-0613b12dd7f6274a1aac07f295ed51d86c2c85f1.tar.gz
gcc-0613b12dd7f6274a1aac07f295ed51d86c2c85f1.tar.bz2
bitint: Fix up lowering of bitfield loads/stores [PR114313]
The following testcase ICEs, because for large/huge _BitInt bitfield loads/stores we use the DECL_BIT_FIELD_REPRESENTATIVE as the underlying "var" and indexes into it can be larger than the precision of the bitfield might normally allow. The following patch fixes that by passing NULL_TREE type in that case to limb_access, so that we always return m_limb_type type and don't do the extra assertions, after all, the callers expect that too. I had to add the first hunk to avoid ICE, it was using type in one place even when it was NULL. But TYPE_SIZE (TREE_TYPE (var)) seems like the right size to use anyway because the code uses VIEW_CONVERT_EXPR on it. 2024-03-13 Jakub Jelinek <jakub@redhat.com> PR middle-end/114313 * gimple-lower-bitint.cc (bitint_large_huge::limb_access): Use TYPE_SIZE of TREE_TYPE (var) rather than TYPE_SIZE of type. (bitint_large_huge::handle_load): Pass NULL_TREE rather than rhs_type to limb_access for the bitfield load cases. (bitint_large_huge::lower_mergeable_stmt): Pass NULL_TREE rather than lhs_type to limb_access if nlhs is non-NULL. * gcc.dg/torture/bitint-62.c: New test.
Diffstat (limited to 'libitm')
0 files changed, 0 insertions, 0 deletions