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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.0                         |8.2
            Summary|[9 Regression] ICE in       |[8/9 Regression] ICE in
                   |wide_int_to_tree_1, at      |wide_int_to_tree_1, at
                   |tree.c:1549                 |tree.c:1549

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It actually started with r254830 if you drop the default(none) so that you
don't hit the bug r260156 was fixing.
Not really sure if it is desirable to slow down code at runtime for warnings
though, by forcing passing around array lengths for the cases of pointers to
VLA, even when nothing in the code refers to those temporaries.

The problem is in:
      warning_at (location, OPT_Warray_bounds,
                  "array subscript %E is below array bounds of %qT",
                  low_sub, artype);
where we've checked that low_bound is INTEGER_CST, but up_bound is
error_mark_node (what the temporary VAR_DECL that doesn't get passed to the
parallel region is replaced with).

So, either we shouldn't try to print %qT in this case, at least when up_bound
is error_mark_node, or the type printing should handle the case of
error_mark_node bounds gracefully (say print it as [] rather than crash), or
perhaps omp expansion could just try to replace these error_mark_node array
bounds with NULLs somewhere (no idea if that is actually possible though).

Reply via email to