]> git.ipfire.org Git - thirdparty/gcc.git/commit
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)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:18:34 +0000 (13:18 -0300)
commit09fdf69753a2064004bf7a82c24d28187c66a66c
tree6e7de4db1a37acb9d2f64877291af595cfd1cb1d
parent02b57c7b83b2de9f9b6428fce546cbbea3f6b139
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]