From: Jakub Jelinek Date: Tue, 11 Jun 2019 08:20:02 +0000 (+0200) Subject: re PR bootstrap/90819 (-Walloc-size-larger-than error in trans-mem.c) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;ds=sidebyside;h=9f95c526a9f165fb7026d2ebd9a2ca82b25a503d;p=gcc.git re PR bootstrap/90819 (-Walloc-size-larger-than error in trans-mem.c) PR bootstrap/90819 * trans-mem.c (tm_memopt_compute_available): Add assertion that blocks is not empty. Formatting fix. From-SVN: r272145 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8350a6fc163..66e45395da8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-06-11 Jakub Jelinek + + PR bootstrap/90819 + * trans-mem.c (tm_memopt_compute_available): Add assertion + that blocks is not empty. Formatting fix. + 2019-06-11 Martin Liska PR c++/87847 diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index d16f5f9cad1..35d4fab64b8 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -3708,9 +3708,9 @@ tm_memopt_compute_available (struct tm_region *region, /* Allocate a worklist array/queue. Entries are only added to the list if they were not already on the list. So the size is bounded by the number of basic blocks in the region. */ + gcc_assert (!blocks.is_empty ()); qlen = blocks.length () - 1; - qin = qout = worklist = - XNEWVEC (basic_block, qlen); + qin = qout = worklist = XNEWVEC (basic_block, qlen); /* Put every block in the region on the worklist. */ for (i = 0; blocks.iterate (i, &bb); ++i)