]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix output_constructor_bitfield handling of wide bitfields (PR89037)
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 25 Jan 2019 16:57:32 +0000 (16:57 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 25 Jan 2019 16:57:32 +0000 (16:57 +0000)
commit3c35efc322f7ff8d25b81cf9ebc01d0ec202bb89
tree8c687e9e504a57ca6818174a9eb80e2cade73e41
parent62fa42ce812c699b8cc270b486ef8d644c0342de
Fix output_constructor_bitfield handling of wide bitfields (PR89037)

The testcase was failing because we were trying to access
TREE_INT_CST_ELT (x, 1) of a 128-bit integer that was small enough
to need only a single element.

2019-01-25  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR middle-end/89037
* varasm.c (output_constructor_bitfield): Use wi::extract_uhwi
instead of accessing TREE_INT_CST_ELT directly.

gcc/testsuite/
PR middle-end/89037
* gcc.dg/pr89037.c: New test.

From-SVN: r268272
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr89037.c [new file with mode: 0644]
gcc/varasm.c