]> git.ipfire.org Git - thirdparty/gcc.git/commit
bitint: Fix tree node sharing bug [PR114209]
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Mar 2024 10:15:07 +0000 (11:15 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 4 Mar 2024 10:15:07 +0000 (11:15 +0100)
commitc27148f2f40654a638bcf429633be1c0561529d5
tree7980f931e1f5446a7e8fec8640aa87921e3e1aaa
parent889fbc9454e2d4e2b9a11a9e02b3b7e698edcd1c
bitint: Fix tree node sharing bug [PR114209]

We ICE on the following testcase due to invalid tree sharing.
The second hunk fixes that, the first one is from me looking around at
other spots which might need end up with invalid tree sharing too.

2024-03-04  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/114209
* gimple-lower-bitint.cc (bitint_large_huge::limb_access): Call
unshare_expr when creating a MEM_REF from MEM_REF.
(bitint_large_huge::lower_stmt): Call unshare_expr.

* gcc.dg/bitint-97.c: New test.
gcc/gimple-lower-bitint.cc
gcc/testsuite/gcc.dg/bitint-97.c [new file with mode: 0644]