https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88216
Bug ID: 88216 Summary: ICE (-std=c++2a) in cxx_eval_constant_expression, at cp/constexpr.c:4602 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: emmanuel.le-tr...@cnrs-orleans.fr Target Milestone: --- $ g++-9 -v Using built-in specs. COLLECT_GCC=g++-9 COLLECT_LTO_WRAPPER=/home/manu/system/opt/gcc-9/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-9/configure --prefix=/home/manu/system/opt/gcc-9 --program-suffix=-9 Thread model: posix gcc version 9.0.0 20181123 (experimental) (GCC) $ cat bug.cpp struct T {}; template <T t> struct U {}; template <T t> int f (U <t>); $ g++-9 -std=c++2a -Wall -Wextra -c bug.cpp bug.cpp:10:8: internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.c:4602 10 | f (U <t>); | ^ 0x5ee04a cxx_eval_constant_expression ../../gcc-9/gcc/cp/constexpr.c:4602 0x8759b6 cxx_eval_call_expression ../../gcc-9/gcc/cp/constexpr.c:1511 0x877af8 cxx_eval_constant_expression ../../gcc-9/gcc/cp/constexpr.c:4296 0x87cf3e cxx_eval_outermost_constant_expr ../../gcc-9/gcc/cp/constexpr.c:5032 0x9a9f03 get_template_parm_object ../../gcc-9/gcc/cp/pt.c:6665 0x9a9f03 convert_nontype_argument ../../gcc-9/gcc/cp/pt.c:7126 0x9a9f03 convert_template_argument ../../gcc-9/gcc/cp/pt.c:8033 0x9a9f03 convert_template_argument ../../gcc-9/gcc/cp/pt.c:7784 0x995793 coerce_template_parms ../../gcc-9/gcc/cp/pt.c:8509 0x9a115e lookup_template_class_1 ../../gcc-9/gcc/cp/pt.c:9325 0x9a115e lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc-9/gcc/cp/pt.c:9684 0x9d29db finish_template_type(tree_node*, tree_node*, int) ../../gcc-9/gcc/cp/semantics.c:3247 0x950295 cp_parser_template_id ../../gcc-9/gcc/cp/parser.c:16295 0x950406 cp_parser_class_name ../../gcc-9/gcc/cp/parser.c:22858 0x95376b cp_parser_qualifying_entity ../../gcc-9/gcc/cp/parser.c:6644 0x95376b cp_parser_nested_name_specifier_opt ../../gcc-9/gcc/cp/parser.c:6330 0x950b78 cp_parser_simple_type_specifier ../../gcc-9/gcc/cp/parser.c:17634 0x947be5 cp_parser_type_specifier ../../gcc-9/gcc/cp/parser.c:17307 0x948a8e cp_parser_decl_specifier_seq ../../gcc-9/gcc/cp/parser.c:13961 0x9618b0 cp_parser_parameter_declaration ../../gcc-9/gcc/cp/parser.c:21973 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.