https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Fri Jan 25 16:57:32 2019
New Revision: 268272

URL: https://gcc.gnu.org/viewcvs?rev=268272&root=gcc&view=rev
Log:
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.sandif...@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.

Added:
    trunk/gcc/testsuite/gcc.dg/pr89037.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/varasm.c

Reply via email to