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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |56456

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Another slightly different ICE in the same code:

$ cat t.c && gcc -O2 -Wall t.c
void f (void*);

int g (int n)
{
  int a[0][n];

  f (a);

  return ((int*) a)[0];
}

during GIMPLE pass: vrp
t.c: In function ā€˜g’:
t.c:3:5: internal compiler error: tree check: expected integer_cst, have
var_decl in get_len, at tree.h:5947
    3 | int g (int n)
      |     ^
0x1777567 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /ssd/src/gcc/10-branch/gcc/tree.c:9730
0x8d48d7 tree_check(tree_node const*, char const*, int, char const*, tree_code)
        /ssd/src/gcc/10-branch/gcc/tree.h:3550
0xaa24bf wi::extended_tree<128>::get_len() const
        /ssd/src/gcc/10-branch/gcc/tree.h:5947
0xaa20fc wi::int_traits<generic_wide_int<wi::extended_tree<128> >
>::decompose(long*, unsigned int, generic_wide_int<wi::extended_tree<128> >
const&)
        /ssd/src/gcc/10-branch/gcc/wide-int.h:985
0xaa1a32 wide_int_ref_storage<true,
false>::wide_int_ref_storage<generic_wide_int<wi::extended_tree<128> >
>(generic_wide_int<wi::extended_tree<128> > const&, unsigned int)
        /ssd/src/gcc/10-branch/gcc/wide-int.h:1034
0xaa0a1a generic_wide_int<wide_int_ref_storage<true, false>
>::generic_wide_int<generic_wide_int<wi::extended_tree<128> >
>(generic_wide_int<wi::extended_tree<128> > const&, unsigned int)
        /ssd/src/gcc/10-branch/gcc/wide-int.h:790
0xafc231
fixed_wide_int_storage<128>::fixed_wide_int_storage<generic_wide_int<wi::extended_tree<128>
> >(generic_wide_int<wi::extended_tree<128> > const&)
        /ssd/src/gcc/10-branch/gcc/wide-int.h:1262
0xafad7c generic_wide_int<fixed_wide_int_storage<128> >&
generic_wide_int<fixed_wide_int_storage<128>
>::operator=<generic_wide_int<wi::extended_tree<128> >
>(generic_wide_int<wi::extended_tree<128> > const&)
        /ssd/src/gcc/10-branch/gcc/wide-int.h:937
0x1746e1e vrp_prop::check_mem_ref(unsigned int, tree_node*, bool)
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:3826
0x1748412 check_array_bounds
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:4050
0x1782e0c 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*> >*))
        /ssd/src/gcc/10-branch/gcc/tree.c:12000
0xe07e82 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /ssd/src/gcc/10-branch/gcc/gimple-walk.c:202
0x1748545 check_array_bounds_dom_walker::before_dom_children(basic_block_def*)
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:4106
0x2201748 dom_walker::walk(basic_block_def*)
        /ssd/src/gcc/10-branch/gcc/domwalk.c:309
0x17485ac vrp_prop::check_all_array_refs()
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:4123
0x174ba18 vrp_prop::vrp_finalize(bool)
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:5195
0x174baad execute_vrp
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:5263
0x174bcc7 execute
        /ssd/src/gcc/10-branch/gcc/tree-vrp.c:5345
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.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456
[Bug 56456] [meta-bug] bogus/missing -Warray-bounds

Reply via email to