https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037
--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Author: rsandifo Date: Mon Apr 29 08:32:27 2019 New Revision: 270643 URL: https://gcc.gnu.org/viewcvs?rev=270643&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-04-29 Richard Sandiford <richard.sandif...@arm.com> gcc/ Backport from mainline: 2019-01-25 Richard Sandiford <richard.sandif...@arm.com> PR middle-end/89037 * varasm.c (output_constructor_bitfield): Use wi::extract_uhwi instead of accessing TREE_INT_CST_ELT directly. gcc/testsuite/ Backport from mainline: 2019-01-25 Richard Sandiford <richard.sandif...@arm.com> PR middle-end/89037 * gcc.dg/pr89037.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89037.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/varasm.c