https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63889
Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> --- The code example looks invalid for several reasons, but the following is a simplified example that is free of library dependencies and ICEs as well: //----------------- template<class T> struct A { template<class> static constexpr bool is_ok = true; template<bool v = is_ok<T>> A(T) { } }; A<int> p(42); //----------------- For gcc 5.0.0 20141115 (experimental) using the flags -Wall -Wextra -std=c++1y -pedantic I get: "prog.cc:7:21: internal compiler error: in retrieve_specialization, at cp/pt.c:1047 template<bool v = is_ok<T>> ^ 0x5d8a93 retrieve_specialization /home/heads/gcc/gcc-source/gcc/cp/pt.c:1047 0x5e17de instantiate_template_1 /home/heads/gcc/gcc-source/gcc/cp/pt.c:15821 0x5e17de instantiate_template(tree_node*, tree_node*, int) /home/heads/gcc/gcc-source/gcc/cp/pt.c:15915 0x6796c5 finish_template_variable(tree_node*) /home/heads/gcc/gcc-source/gcc/cp/semantics.c:2454 0x6796c5 finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) /home/heads/gcc/gcc-source/gcc/cp/semantics.c:3551 0x628e4b cp_parser_primary_expression /home/heads/gcc/gcc-source/gcc/cp/parser.c:4727 0x62c968 cp_parser_postfix_expression /home/heads/gcc/gcc-source/gcc/cp/parser.c:6089 0x6343ed cp_parser_unary_expression /home/heads/gcc/gcc-source/gcc/cp/parser.c:7370 0x6350e4 cp_parser_binary_expression /home/heads/gcc/gcc-source/gcc/cp/parser.c:8104 0x63564f cp_parser_assignment_expression /home/heads/gcc/gcc-source/gcc/cp/parser.c:8347 0x635ae5 cp_parser_constant_expression /home/heads/gcc/gcc-source/gcc/cp/parser.c:8593 0x63753a cp_parser_default_argument /home/heads/gcc/gcc-source/gcc/cp/parser.c:19052 0x6314b9 cp_parser_parameter_declaration /home/heads/gcc/gcc-source/gcc/cp/parser.c:18968 0x63d40b cp_parser_template_parameter /home/heads/gcc/gcc-source/gcc/cp/parser.c:13289 0x63d40b cp_parser_template_parameter_list /home/heads/gcc/gcc-source/gcc/cp/parser.c:13192 0x644991 cp_parser_template_declaration_after_export /home/heads/gcc/gcc-source/gcc/cp/parser.c:23445 0x6468ae cp_parser_member_declaration /home/heads/gcc/gcc-source/gcc/cp/parser.c:20601 0x62e53c cp_parser_member_specification_opt /home/heads/gcc/gcc-source/gcc/cp/parser.c:20528 0x62e53c cp_parser_class_specifier_1 /home/heads/gcc/gcc-source/gcc/cp/parser.c:19720 0x62e53c cp_parser_class_specifier /home/heads/gcc/gcc-source/gcc/cp/parser.c:19956 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions."