https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82768
Bug ID: 82768 Summary: ICE in synthesize_implicit_template_parm, at cp/parser.c:39338 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gomboc at cs dot ucr.edu Target Milestone: --- $>/opt/gcc-git/bin/g++ --version g++ (GCC) 8.0.0 20171029 (experimental) Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $>/opt/gcc-git/bin/g++ -fconcepts ice_repro.cpp ice_repro.cpp:45:5: internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:39338 Addressable another_arbitrary_object ^~~~~~~~~~~ 0x839bd8 synthesize_implicit_template_parm /home/dave/gits/gcc/master/gcc/cp/parser.c:39338 0x839f17 cp_parser_maybe_constrained_type_specifier /home/dave/gits/gcc/master/gcc/cp/parser.c:17478 0x83a041 cp_parser_nonclass_name /home/dave/gits/gcc/master/gcc/cp/parser.c:17556 0x85d29f cp_parser_type_name /home/dave/gits/gcc/master/gcc/cp/parser.c:17362 0x85d29f cp_parser_simple_type_specifier /home/dave/gits/gcc/master/gcc/cp/parser.c:17234 0x85a175 cp_parser_type_specifier /home/dave/gits/gcc/master/gcc/cp/parser.c:16880 0x868111 cp_parser_decl_specifier_seq /home/dave/gits/gcc/master/gcc/cp/parser.c:13685 0x868881 cp_parser_parameter_declaration /home/dave/gits/gcc/master/gcc/cp/parser.c:21550 0x8691f4 cp_parser_parameter_declaration_list /home/dave/gits/gcc/master/gcc/cp/parser.c:21363 0x86971c cp_parser_parameter_declaration_clause /home/dave/gits/gcc/master/gcc/cp/parser.c:21286 0x84e647 cp_parser_requirement_parameter_list /home/dave/gits/gcc/master/gcc/cp/parser.c:25702 0x84e647 cp_parser_requires_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:25672 0x84e647 cp_parser_primary_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:5369 0x85de58 cp_parser_postfix_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:7022 0x86166a cp_parser_unary_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:8363 0x83ead9 cp_parser_cast_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:9131 0x83f317 cp_parser_binary_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:9232 0x840ce4 cp_parser_assignment_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:9519 0x83fd2b cp_parser_constant_expression /home/dave/gits/gcc/master/gcc/cp/parser.c:9803 0x840c67 cp_parser_initializer_clause /home/dave/gits/gcc/master/gcc/cp/parser.c:21963 $>g++ --version g++ (Debian 7.2.0-12) 7.2.1 20171025 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $>g++ -fconcepts ice_repro.cpp ice_repro.cpp:45:5: internal compiler error: in synthesize_implicit_template_parm, at cp/parser.c:38789 Addressable another_arbitrary_object complete ice_repro.cpp: #include <type_traits> template < template <typename...> typename arbitrary_template_type, typename... arbitrary_template_argument_types > concept bool Template_type = requires { typename arbitrary_template_type< arbitrary_template_argument_types... >; }; template < typename first_argument, template <typename...> typename type_trait, typename... any_remaining_arguments > concept bool Satisfies = Template_type< type_trait, first_argument, any_remaining_arguments... > && type_trait< first_argument, any_remaining_arguments... >::value; template <typename lhs_type, typename rhs_type> concept bool Same = Satisfies<lhs_type, std::is_same, rhs_type>; template <typename arbitrary_type> concept bool Addressable = requires (arbitrary_type & ref, arbitrary_type const & cref) { requires Same<arbitrary_type &, decltype(&ref)>; requires Same<arbitrary_type const &, decltype(&cref)>; }; template <typename arbitrary_type> concept bool InternalCompilerError = requires ( arbitrary_type arbitrary_object, Addressable another_arbitrary_object ) {};