fold-const: Handle bitfields in native_encode_initializer [PR93121]
authorJakub Jelinek <jakub@redhat.com>
Mon, 20 Jul 2020 08:08:28 +0000 (10:08 +0200)
committerJakub Jelinek <jakub@redhat.com>
Mon, 20 Jul 2020 08:08:28 +0000 (10:08 +0200)
commit83b171655dc0785262a444f5d5c2be7195977987
tree9147f91e49fe9dd15c6885d5d4ec1948f448f88b
parent0251a7eef9638f4c1e6a96af60d9607c37821b14
fold-const: Handle bitfields in native_encode_initializer [PR93121]

When working on __builtin_bit_cast that needs to handle bitfields too,
I've made the following change to handle at least some bitfields in
native_encode_initializer (those that have integral representative).

2020-07-20  Jakub Jelinek  <jakub@redhat.com>

PR libstdc++/93121
* fold-const.c (native_encode_initializer): Handle bit-fields.

* gcc.dg/tree-ssa/pr93121-1.c: New test.
gcc/fold-const.c
gcc/testsuite/gcc.dg/tree-ssa/pr93121-1.c [new file with mode: 0644]