Re: [PATCH] inline-asm: Fix ICE with bitfields in "m" operands [PR100785]

2021-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/21 11:25 AM, Jakub Jelinek wrote: On Wed, Jun 02, 2021 at 11:09:45AM -0400, Jason Merrill wrote: On 6/2/21 3:59 AM, Jakub Jelinek wrote: if (!allows_reg && !cxx_mark_addressable (*op)) operand = error_mark_node; + else if (!allows_reg && bitfield

Re: [PATCH] inline-asm: Fix ICE with bitfields in "m" operands [PR100785]

2021-06-02 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 02, 2021 at 11:09:45AM -0400, Jason Merrill wrote: > On 6/2/21 3:59 AM, Jakub Jelinek wrote: > > if (!allows_reg && !cxx_mark_addressable (*op)) > > operand = error_mark_node; > > + else if (!allows_reg && bitfield_p (*op)) > > + { > > +

Re: [PATCH] inline-asm: Fix ICE with bitfields in "m" operands [PR100785]

2021-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/21 3:59 AM, Jakub Jelinek wrote: if (!allows_reg && !cxx_mark_addressable (*op)) operand = error_mark_node; + else if (!allows_reg && bitfield_p (*op)) + { + error_at (loc, "attempt to take address of bit-field"); Hm

[PATCH] inline-asm: Fix ICE with bitfields in "m" operands [PR100785]

2021-06-02 Thread Jakub Jelinek via Gcc-patches
Hi! Bitfields, while they live in memory, aren't something inline-asm can easily operate on. For C and "=m" or "+m", we were diagnosing bitfields in the past in the FE, where c_mark_addressable had: case COMPONENT_REF: if (DECL_C_BIT_FIELD (TREE_OPERAND (x, 1))) {