Fix false positive for -Walloc-size-larger-than (PR bootstrap/79132).
authorMartin Liska <mliska@suse.cz>
Tue, 24 Jan 2017 08:48:36 +0000 (09:48 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 24 Jan 2017 08:48:36 +0000 (08:48 +0000)
2017-01-24  Martin Liska  <mliska@suse.cz>

PR bootstrap/79132
* tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
that would prevent us to call alloca with -1 as argument.

From-SVN: r244857

gcc/ChangeLog
gcc/tree-ssa-reassoc.c

index d97220b53522690f62957a828490126522ec10b6..bec27d3d9921467ade9cbf370ce004f041237cda 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-24  Martin Liska  <mliska@suse.cz>
+
+       PR bootstrap/79132
+       * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
+       that would prevent us to call alloca with -1 as argument.
+
 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
 
        * dwarf2out.c (output_compilation_unit_header, output_file_names):
index 503edd3870deda5a9b663eceab5482bd5de7098a..4a796f48864075c7d8ca2a7bc0822780be1bfe4c 100644 (file)
@@ -4407,6 +4407,7 @@ rewrite_expr_tree_parallel (gassign *stmt, int width,
 {
   enum tree_code opcode = gimple_assign_rhs_code (stmt);
   int op_num = ops.length ();
+  gcc_assert (op_num > 0);
   int stmt_num = op_num - 1;
   gimple **stmts = XALLOCAVEC (gimple *, stmt_num);
   int op_index = op_num - 1;