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

            Bug ID: 79410
           Summary: [6 Regression] internal compiler error: in
                    gimplify_init_ctor_preeval, at gimplify.c:3489
           Product: gcc
           Version: 6.3.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

This gives an ICE with -O1

struct duration {
  long val;
  static constexpr duration max() { return {}; }
};
struct S {
  duration max = duration::max();
};
void Ice(S& s) {
  s = {};
}

ice.cc: In function ‘void Ice(S&)’:
ice.cc:9:9: internal compiler error: in gimplify_init_ctor_preeval, at
gimplify.c:3489
   s = {};
         ^
0x8e5582 gimplify_init_ctor_preeval
        ../../gcc-6.3.0/gcc/gimplify.c:3489
0x8e5acf gimplify_init_constructor
        ../../gcc-6.3.0/gcc/gimplify.c:4063
0x8e6421 gimplify_modify_expr_rhs
        ../../gcc-6.3.0/gcc/gimplify.c:4346
0x8e652f gimplify_modify_expr
        ../../gcc-6.3.0/gcc/gimplify.c:4683
0x8dcd99 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6.3.0/gcc/gimplify.c:10386
0x8dfae6 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-6.3.0/gcc/gimplify.c:5687
0x8dc8d8 gimplify_cleanup_point_expr
        ../../gcc-6.3.0/gcc/gimplify.c:5463
0x8dc8d8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6.3.0/gcc/gimplify.c:10751
0x8dfae6 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-6.3.0/gcc/gimplify.c:5687
0x8e0cac gimplify_body(tree_node*, bool)
        ../../gcc-6.3.0/gcc/gimplify.c:11532
0x8e1077 gimplify_function_tree(tree_node*)
        ../../gcc-6.3.0/gcc/gimplify.c:11688
0x7bfd27 cgraph_node::analyze()
        ../../gcc-6.3.0/gcc/cgraphunit.c:625
0x7c26df analyze_functions
        ../../gcc-6.3.0/gcc/cgraphunit.c:1086
0x7c2e58 symbol_table::finalize_compilation_unit()
        ../../gcc-6.3.0/gcc/cgraphunit.c:2542
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.

Reply via email to