aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-pattern.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-10-18 17:01:26 +0200
committerThomas Schwinge <tschwinge@baylibre.com>2024-03-11 23:41:16 +0100
commit879c99355c4ab2a86dd77db4ebf4acb70826b1c7 (patch)
tree973baf3b7c9aa6a6058ac085d1656939e6ec9bd0 /gcc/rust/ast/rust-pattern.h
parenta95e21151a6366e7344d0f1983f99e318c5a7097 (diff)
downloadgcc-879c99355c4ab2a86dd77db4ebf4acb70826b1c7.zip
gcc-879c99355c4ab2a86dd77db4ebf4acb70826b1c7.tar.gz
gcc-879c99355c4ab2a86dd77db4ebf4acb70826b1c7.tar.bz2
cse: Workaround GCC < 5 bug in cse_insn [PR111852]
Before the r5-3834 commit for PR63362, GCC 4.8-4.9 refuses to compile cse.cc which contains a variable with rtx_def type, because rtx_def contains a union with poly_uint16 element. poly_int template has defaulted default constructor and a variadic template constructor which could have empty parameter pack. GCC < 5 treated it as non-trivially constructible class and deleted rtunion and rtx_def default constructors. For the cse_insn purposes, all we need is a variable with size and alignment of rtx_def, not necessarily rtx_def itself, which we then memset to 0 and fill in like rtx is normally allocated from heap, so this patch for GCC_VERSION < 5000 uses an unsigned char array of the right size/alignment. 2023-10-18 Jakub Jelinek <jakub@redhat.com> PR bootstrap/111852 * cse.cc (cse_insn): Add workaround for GCC 4.8-4.9, instead of using rtx_def type for memory_extend_buf, use unsigned char arrayy with size of rtx_def and its alignment. (cherry picked from commit bc4bd69faf986326f6b0fd0400cdd6871577afd1)
Diffstat (limited to 'gcc/rust/ast/rust-pattern.h')
0 files changed, 0 insertions, 0 deletions