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]

[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...")


Hi,

yesterday I figured out that this issue is in fact orthogonal to possible improvements to maybe_deduce_size_from_array_init, indeed it happens also when we are not deducing the size. The testcase is very similar to that recently submitted for c++/78345, which led Jason to add the bit of additional checking around the middle of build_aggr_init. Since we did already have a similar check a bit earlier - not requiring the computation of from_array - I added one for VAR_DECLs too in the same place and tweaked/improved a bit the error message in the process (a few greps revealed that we don't seem to have any other generic error message using the form "bad ..."), consistently with the diagnostic that we already provide for, eg, a simple

    int a[2] = a;

FYI, I must also add that entire testsuite doesn't have a test triggering the existing TREE_CODE (init) == TREE_LIST check, and failed so far to construct one... (many such issues are normally catched by digest_init). Tested x86_64-linux.

Thanks, Paolo.

/////////////////////


Attachment: CL_84632
Description: Text document

Attachment: patch_84632
Description: Text document


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