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 85014 ("[7/8/9 Regression] internal compiler error: in lookup_base, at cp/search.c:185")


On 3/15/19 9:28 AM, Paolo Carlini wrote:
Hi,

another - rather long standing - error-recovery regression, where, in some rather special circumstances, we end up passing the FUNCTION_DECL representing the operator () of the lambda to maybe_dummy_object and obviously we almost immediately crash. Not sure how much we want to dig - but simply checking that context_for_name_lookup is actually returning a type appears to work fine, the error_mark_node then propagates back to cp_parser_late_parse_one_default_arg and so on. In the special circumstances of the testcase, context_for_name_lookup finds ANON_AGGR_TYPE_P set for the DECL_CONTEXT of 'b' and iterates to its TYPE_CONTEXT which is the FUNCTION_DECL representing the operator () of the lambda. This is because we just called check_tag_decl on that anonymous type as part of calling shadow_tag on the abstract declaration. Tested x86_64-linux.

OK.

Jason


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