This is the mail archive of the 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: Patch for constexpr variable templates

I can confirm that this is caused by a change to pt.c that happened, I think, the day before my last patch.

This can be fixed by first checking that the template is a function template at that line in pt.c. Since variable templates can't be friends, it might also be suitable to skip that entire block if it is a function template.

Should I submit that as a patch?

- Braden Obrzut

On 08/05/2014 04:06 PM, Paolo Carlini wrote:

On 08/05/2014 08:26 PM, Jason Merrill wrote:
Applied with a few formatting/comment tweaks, thanks!
Great. I will double check but var-templ4.C fails for me with an ICE. Can anybody reproduce?



/.../gcc/testsuite/g++.dg/cpp1y/var-templ4.C:8:17: internal compiler error: tree check: expected function_decl, have var_decl in check_explicit_specialization, at cp/pt.c:2822 0xde05a4 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
0x5f9dd9 tree_check(tree_node*, char const*, int, char const*, tree_code)
0x5f9dd9 check_explicit_specialization(tree_node*, tree_node*, int, int)
0x5af6e1 grokvardecl
0x5af6e1 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**)
0x5b24b4 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**)
0x68ff5f cp_parser_init_declarator
0x690b0a cp_parser_single_declaration
0x69160d cp_parser_explicit_specialization
0x69bfaf cp_parser_declaration
0x69ab18 cp_parser_declaration_seq_opt
0x69c3b3 cp_parser_translation_unit
0x69c3b3 c_parse_file()
0x7c0712 c_common_parse_file()

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