https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89852

            Bug ID: 89852
           Summary: [9 Regression] ICE in
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

seen with trunk r269832, the reduced test is a little bit too much reduced ...

$ cat tst_Controller.ii
namespace std {
namespace chrono {
struct a {
  int b;
} typedef microseconds;
} // namespace chrono
} // namespace std
namespace ableton {
namespace link {
struct c {
  c(double);
};
struct B {
  B(double);
};
struct d {
  B e;
  c f;
  std::chrono::microseconds g;
};
namespace {
const auto kAnyTime = std::chrono::a{};
template <typename> void h() {
  d {
    60., 0., kAnyTime

$ g++ -c -O0 -Werror -Wno-multichar -std=gnu++11 tst_Controller.ii
tst_Controller.ii: In function 'void ableton::link::{anonymous}::h()':
tst_Controller.ii:25:14: internal compiler error: unexpected expression
'(std::chrono::microseconds)ableton::link::{anonymous}::kAnyTime' of kind
implicit_conv_expr
   25 |     60., 0., kAnyTime
      |              ^~~~~~~~
0x5c6940 cxx_eval_constant_expression
        ../../src/gcc/cp/constexpr.c:5167
0xeb7394 cxx_eval_outermost_constant_expr
        ../../src/gcc/cp/constexpr.c:5281
0xebac0e maybe_constant_init_1
        ../../src/gcc/cp/constexpr.c:5637
0x12dc6bd massage_init_elt
        ../../src/gcc/cp/typeck2.c:1329
0xf63e32 process_init_constructor_record
        ../../src/gcc/cp/typeck2.c:1548
0xf63e32 process_init_constructor
        ../../src/gcc/cp/typeck2.c:1822
0xf63e32 digest_init_r
        ../../src/gcc/cp/typeck2.c:1218
0x12d536e finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
        ../../src/gcc/cp/semantics.c:2874
0xf1890b cp_parser_functional_cast
        ../../src/gcc/cp/parser.c:28318
0xf0fb84 cp_parser_postfix_expression
        ../../src/gcc/cp/parser.c:7098
0xf0e522 cp_parser_unary_expression
        ../../src/gcc/cp/parser.c:8469
0xf0df9f cp_parser_cast_expression
        ../../src/gcc/cp/parser.c:9355
0xf0d0ab cp_parser_binary_expression
        ../../src/gcc/cp/parser.c:9457
0xf0bf37 cp_parser_assignment_expression
        ../../src/gcc/cp/parser.c:9754
0xf1270b cp_parser_expression
        ../../src/gcc/cp/parser.c:9921
0xf14925 cp_parser_expression_statement
        ../../src/gcc/cp/parser.c:11485
0xf13c97 cp_parser_statement
        ../../src/gcc/cp/parser.c:11281
0xf1372e cp_parser_statement_seq_opt
        ../../src/gcc/cp/parser.c:11628
0xf1372e cp_parser_compound_statement
        ../../src/gcc/cp/parser.c:11582
0xf1317e cp_parser_function_body
        ../../src/gcc/cp/parser.c:22631
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Reply via email to