[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 rsandifo at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from rsandifo at gcc dot gnu.org --- Fixed.
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 --- Comment #8 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Tue May 7 08:49:05 2019 New Revision: 270936 URL: https://gcc.gnu.org/viewcvs?rev=270936&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-05-07 Richard Sandiford gcc/ Backport from mainline: 2019-01-25 Richard Sandiford 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 PR middle-end/89037 * gcc.dg/pr89037.c: New test. Added: branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr89037.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/varasm.c
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org Target Milestone|9.2 |7.5
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.0 |9.2 --- Comment #7 from Jakub Jelinek --- GCC 9.1 has been released.
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 --- Comment #6 from 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 gcc/ Backport from mainline: 2019-01-25 Richard Sandiford 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 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
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 Wilco changed: What|Removed |Added CC||wilco at gcc dot gnu.org Version|9.0 |6.5.0 Target Milestone|--- |9.0 Known to fail||6.0, 7.0, 8.0 --- Comment #5 from Wilco --- Note this fails on GCC6, GCC7 and GCC8 too.
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 --- Comment #4 from 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 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
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 rsandifo at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org --- Comment #3 from rsandifo at gcc dot gnu.org --- (In reply to Richard Biener from comment #2) > Richard, can you have a look? Sure. And yeah, agree an extract_uhwi-based sequence is the way to go.
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 Richard Biener changed: What|Removed |Added CC||rsandifo at gcc dot gnu.org --- Comment #2 from Richard Biener --- Richard, can you have a look?
[Bug middle-end/89037] checking ice emitting 128-bit bit-field initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89037 Richard Biener changed: What|Removed |Added Target|aarch64 |aarch64 x86_64-*-* Status|UNCONFIRMED |NEW Last reconfirmed||2019-01-24 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- And on x86_64-linux as well. I guess we should use extract_uhwi instead of TREE_INT_CST_ELT. Oddly enough I need to resort to a widest_int here... (and more than this single place uses TREE_INT_CST_ELT). Index: varasm.c === --- varasm.c(revision 268010) +++ varasm.c(working copy) @@ -5407,7 +5407,8 @@ output_constructor_bitfield (oc_local_st = HOST_BITS_PER_WIDE_INT - (shift & (HOST_BITS_PER_WIDE_INT - 1)); /* Now get the bits from the appropriate constant word. */ - value = TREE_INT_CST_ELT (local->val, shift / HOST_BITS_PER_WIDE_INT); + value = wi::extract_uhwi (wi::to_widest (local->val), + shift, HOST_BITS_PER_WIDE_INT); shift = shift & (HOST_BITS_PER_WIDE_INT - 1); /* Get the result. This works only when: