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 58633


Hi,

in this ICE on valid, 4.7/4.8/4.9 Regression, the ICE happens in the second half of cp_parser_decltype_expr, when cp_parser_abort_tentative_parse is called in an inconstent status: tentative parsing is committed and no errors. The reason is the following: in its main loop cp_parser_postfix_expression calls cp_parser_postfix_dot_deref_expression which in turns calls cp_parser_pseudo_destructor_name and everything appears to be fine, thus the latter commits the tentative parse, but member_access_only_p is *true* in the first half of cp_parser_decltype_expr and even if cp_parser_postfix_expression later also finds valid () following the pseudo dtor expression has to return error_mark_node anyway.

A possible way to resolve the inconsistency is propagating member_access_only_p past cp_parser_postfix_expression to cp_parser_pseudo_destructor_name and in the latter not committing the tentative parse when the flag is true.

Tested x86_64-linux.

Thanks,
Paolo.

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

Attachment: CL_58633
Description: Text document

Attachment: patch_58633
Description: Text document


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