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

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
The full stack trace shows the ICE occurs while formatting the text of a
warning.  strip_typedefs is being called while formatting the type of an array
of d and when assertion below fires:

      if (TYPE_USER_ALIGN (t) != TYPE_USER_ALIGN (result)
          || TYPE_ALIGN (t) != TYPE_ALIGN (result))
        {
          gcc_assert (TYPE_USER_ALIGN (t));
          if (remove_attributes)

during GIMPLE pass: vrp
in strip_typedefs, at cp/tree.c:1737
   41 | m n::ad() const {
      |   ^
0xc6cab1 strip_typedefs(tree_node*, bool*, unsigned int)
        /src/gcc/master/gcc/cp/tree.c:1737
0xa823d8 type_to_string
        /src/gcc/master/gcc/cp/error.c:3214
0xa861d6 cp_printer
        /src/gcc/master/gcc/cp/error.c:4289
0x268d13a pp_format(pretty_printer*, text_info*)
        /src/gcc/master/gcc/pretty-print.c:1458
0x2666327 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        /src/gcc/master/gcc/diagnostic.c:1159
0x266694b diagnostic_impl
        /src/gcc/master/gcc/diagnostic.c:1309
0x26671c7 warning_at(unsigned int, int, char const*, ...)
        /src/gcc/master/gcc/diagnostic.c:1446
0x19b82ae vrp_prop::check_array_ref(unsigned int, tree_node*, bool)
        /src/gcc/master/gcc/tree-vrp.c:3578
0x19ba715 check_array_bounds
        /src/gcc/master/gcc/tree-vrp.c:4062
0x19f1508 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /src/gcc/master/gcc/tree.c:12000
0x10ed4ac walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /src/gcc/master/gcc/gimple-walk.c:202
0x19ba871 check_array_bounds_dom_walker::before_dom_children(basic_block_def*)
        /src/gcc/master/gcc/tree-vrp.c:4120
0x23f5aed dom_walker::walk(basic_block_def*)
        /src/gcc/master/gcc/domwalk.c:309
0x19ba8d5 vrp_prop::check_all_array_refs()
        /src/gcc/master/gcc/tree-vrp.c:4137
0x19bdb47 vrp_prop::vrp_finalize(bool)
        /src/gcc/master/gcc/tree-vrp.c:5209
0x19bdbdc execute_vrp
        /src/gcc/master/gcc/tree-vrp.c:5277
0x19bdddb execute
        /src/gcc/master/gcc/tree-vrp.c:5359
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.

Reply via email to