This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] PR 84632 ("[8 Regression] internal compiler error: tree check: expected record_type or union_type or qual_union_type, have array_type in reduced_constant_expression_p...")


On Fri, Mar 23, 2018 at 6:13 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> On 22/03/2018 23:26, Jason Merrill wrote:
>>
>> On Thu, Mar 22, 2018 at 5:39 PM, Paolo Carlini <paolo.carlini@oracle.com>
>> wrote:
>>>
>>> ... with patch ;)
>>>
>>> If you are curious where the heck that INDIRECT_REF is coming from, is
>>> coming from the gimplifier, cp_gimpliify_expr, via build_vec_init. Grrr.
>>
>> Hmm, maybe build_vec_init should call itself directly rather than via
>> build_aggr_init in the case of multidimensional arrays.
>
> Yes, arranging things like that seems doable. However, yesterday, while
> fiddling with the idea and instrumenting the code with some gcc_asserts, I
> noticed that we have yet another tree code to handle, TARGET_EXPR, as in
> lines #41, #47, #56 of ext/complit12.C, and in that case build_aggr_init is
> simply called by check_initializer via build_aggr_init_full_exprs, the
> "normal" path. Well, unless we want to adjust/reject complit12.C too, which
> clang rejects, in fact with errors on lines #19 and #29 too. The below
> passes testing.

I think I'd like to allow TARGET_EXPR here, with a comment about
compound literals, but avoid INDIRECT_REF with that build_vec_init
change.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]