aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-08-06 11:28:37 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-08-06 11:29:32 +0200
commitd175a6b119b8ab177ab9d9fb81dcac1794d18ad6 (patch)
tree6afa36165c29cd03b0b5a8d6a6e07a23c0e22c77 /libjava
parent4f2cd5a88838ce0af9f4d6425c55e702e44ae8d2 (diff)
downloadgcc-d175a6b119b8ab177ab9d9fb81dcac1794d18ad6.zip
gcc-d175a6b119b8ab177ab9d9fb81dcac1794d18ad6.tar.gz
gcc-d175a6b119b8ab177ab9d9fb81dcac1794d18ad6.tar.bz2
bitint: Fix up handling of uninitialized mul/div/float cast operands [PR121127]
handle_operand_addr (used for the cases where we use libgcc APIs, so multiplication, division, modulo, casts of _BitInt to float/dfp) when it sees default definition of an SSA_NAME which is not PARM_DECL (i.e. uninitialized one) just allocates single uninitialized limb, there is no need to waste more memory on it, it can just tell libgcc that it has 64-bit precision, not say 1024 bit etc. Unfortunately, doing this runs into some asserts when we have a narrowing cast of the uninitialized SSA_NAME (but still large/huge _BitInt). The following patch fixes that by using a magic value in *prec_stored for the uninitialized cases (0) and just don't do any *prec tweaks for narrowing casts from that. precs still needs to be maintained as before, that one is used for big endian adjustment. 2025-08-06 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/121127 * gimple-lower-bitint.cc (bitint_large_huge::handle_operand_addr): For uninitialized SSA_NAME, set *prec_stored to 0 rather than *prec. Handle that case in narrowing casts. If prec_stored is non-NULL, set *prec_stored to prec_stored_val. * gcc.dg/bitint-125.c: New test.
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions