[PATCH] fold-const: Handle NON_LVALUE_EXPR in native_encode_initializer [PR114537]

2024-04-04 Thread Jakub Jelinek
Hi! The following testcase is incorrectly rejected. The problem is that for bit-fields native_encode_initializer expects the corresponding CONSTRUCTOR elt value must be INTEGER_CST, but that isn't the case here, it is wrapped into NON_LVALUE_EXPR by maybe_wrap_with_location. We could STRIP_ANY_LO

Re: [PATCH] fold-const: Handle NON_LVALUE_EXPR in native_encode_initializer [PR114537]

2024-04-04 Thread Richard Biener
On Thu, 4 Apr 2024, Jakub Jelinek wrote: > Hi! > > The following testcase is incorrectly rejected. The problem is that > for bit-fields native_encode_initializer expects the corresponding > CONSTRUCTOR elt value must be INTEGER_CST, but that isn't the case > here, it is wrapped into NON_LVALUE_E