PR tree-optimization/78775 - [7 Regression] ICE in maybe_warn_alloc_args_overflow
authorMartin Sebor <msebor@redhat.com>
Tue, 10 Jan 2017 21:02:07 +0000 (21:02 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 10 Jan 2017 21:02:07 +0000 (14:02 -0700)
commitc16880eff008084f55a56a07cb7a16453d2b94c4
tree7937fe84404fc72318c09a1797cd2d2d23fdd4c1
parent5d58291930dab0a54f7d2c0e5e272a1ea9b18aad
PR tree-optimization/78775 - [7 Regression] ICE in maybe_warn_alloc_args_overflow

gcc/ChangeLog:

PR tree-optimization/78775
* builtins.c (get_size_range): Move...
* calls.c: ...to here.
(alloc_max_size): Accept zero argument.
(operand_signed_p): Remove.
(maybe_warn_alloc_args_overflow): Call get_size_range.
* calls.h (get_size_range): Declare.

gcc/testsuite/ChangeLog:

PR tree-optimization/78775
* gcc.dg/attr-alloc_size-4.c: Add test cases.
* gcc.dg/attr-alloc_size-10.c: New test.
* gcc.dg/attr-alloc_size-11.c: New test.
* gcc.dg/builtin-stringop-chk-7.c: New test.
* gcc.dg/pr78775.c: New test.
* gcc.dg/pr78973-2.c: New test.
* gcc.dg/pr78973.c: New test.

From-SVN: r244290
12 files changed:
gcc/ChangeLog
gcc/builtins.c
gcc/calls.c
gcc/calls.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/attr-alloc_size-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/attr-alloc_size-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/attr-alloc_size-4.c
gcc/testsuite/gcc.dg/builtin-stringop-chk-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr78775.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr78973-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr78973.c [new file with mode: 0644]