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,this ICE on valid, [4.7/4.8/4.9 Regression], happens only with -std=c++11 and is quite simple to analyze: cxx_eval_constant_expression sees a COMPONENT_REF and forwards to cxx_eval_component_reference, but the latter, evidently, only handles "fields" not functions (per the comment) and an ICE soon happens when it tries to use DECL_MUTABLE_P.
If, for comparison, instead of a static member function, we have a static free function, like in, eg
static void foo(); template<typename> void bar() { foo; }what happens is that cxx_eval_constant_expression sees a FUNCTION_DECL and returns it as-is. Thus I believe that doing the same in the case at issue should be fine.
Tested x86_64-linux. Thanks, Paolo. /////////////////////////
Attachment:
CL_58647
Description: Text document
Attachment:
patch_58647
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |