https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93250
Bug ID: 93250 Summary: [10 Regression] ICE: in sign_mask, at wide-int.h:855 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: larsbj at gullik dot net Target Milestone: --- Created attachment 47644 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47644&action=edit Source showing the ICE g++ (GCC) 10.0.0 20200111 (experimental) (from new git repo: cff5a23148) Compiling the attached source gives: g++ -std=gnu++17 -c v10.cpp v10.cpp: In member function ‘long unsigned int a::c()’: v10.cpp:6:30: internal compiler error: in sign_mask, at wide-int.h:855 6 | unsigned long a ::c() { d >> b; } | ^ 0x5f8c42 generic_wide_int<wide_int_ref_storage<true, false> >::sign_mask() const ../../gcc/gcc/wide-int.h:855 0x5f922a generic_wide_int<wide_int_ref_storage<false, false> >::sign_mask() const ../../gcc/gcc/tree.c:7373 0x5f922a bool wi::neg_p<generic_wide_int<wide_int_ref_storage<false, false> > >(generic_wide_int<wide_int_ref_storage<false, false> > const&, signop) ../../gcc/gcc/wide-int.h:1836 0x5f922a tree_int_cst_sgn(tree_node const*) ../../gcc/gcc/tree.c:7386 0x77bdb1 cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) ../../gcc/gcc/cp/typeck.c:5609 0x627f3b build_new_op_1 ../../gcc/gcc/cp/call.c:6475 0x62886d build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../gcc/gcc/cp/call.c:6520 0x773146 build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) ../../gcc/gcc/cp/typeck.c:4245 0x6db3bd cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:9648 0x6dbf27 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:9783 0x6dc1b2 cp_parser_expression ../../gcc/gcc/cp/parser.c:9951 0x6defc8 cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:11602 0x6e96e3 cp_parser_statement ../../gcc/gcc/cp/parser.c:11398 0x6eadb8 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:11745 0x6eae70 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:11699 0x700590 cp_parser_function_body ../../gcc/gcc/cp/parser.c:22901 0x700590 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:22952 0x703b0d cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:28739 0x704a97 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:28655 0x704a97 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:20530 Compiling with GCC9 works fine. (except for one warning)