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] |
Hi,in this ICE on valid, finish_decltype_type doesn't handle a COMPOUND_EXPR when the second argument, id_expression_or_member_access_p, is true.
As analyzed by Jakub in the audit trail, at parsing time for the test involving:
struct A3 { static const int dummy = 0; };the *.dummy in the template argument of has_const_int_dummy is parsed as a COMPONENT_REF, but then, in case DECLTYPE_TYPE of tsubst it's turned into a COMPOUND_EXPR when it becomes clear that dummy is actually a static data member. Then id_expression_or_member_access_p == true, as stored in the DECLTYPE_TYPE, isn't correct anymore and finish_decltype_type can't handle its arguments.
Now, right before calling finish_decltype_type, we are *already* handling a case where, before the instantiation, we have ~id which, upon instantiation can turn out to be either a complement expression or a destructor: I thought we could handle in the same place this additional case of disambiguation and adjust id_expression_or_member_access_p to false in this case too. The below passes testing on x86_64-linux.
Thanks, Paolo. ///////////////////////
Attachment:
patch_56450
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |