[Bug testsuite/92622] FAIL: gcc.dg/Warray-bounds-22.c on ILP32: missing warnings for VLA on lines 67 and 69
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 5 20:53:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92622
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
I think I see the problem. It's due to the use of an uninitialized variable.
The patch below fixes it:
Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c (revision 279008)
+++ gcc/tree-vrp.c (working copy)
@@ -3544,7 +3544,7 @@ vrp_prop::check_array_ref (location_t location, tr
decl = base;
}
- if (known_gt (off, 0))
+ if (base && known_gt (off, 0))
maxbound = wide_int_to_tree (sizetype,
wi::sub (wi::to_wide (maxbound),
off));
More information about the Gcc-bugs
mailing list