re PR tree-optimization/83648 (missing -Wsuggest-attribute=malloc on a trivial malloc...
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Tue, 15 May 2018 06:07:48 +0000 (06:07 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Tue, 15 May 2018 06:07:48 +0000 (06:07 +0000)
commita8c80d03d4e0fab9cf4edb7bd5acb7edafd2438c
tree4cc4883b6dd1ef245b4bef9ff5fef8cf94775da0
parent0fac5f2a7f15974deabf6432f4f510d0f4bcc6bc
re PR tree-optimization/83648 (missing -Wsuggest-attribute=malloc on a trivial malloc-like function)

2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR tree-optimization/83648
* ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
return value as malloc candidate.

testsuite/
* gcc.dg/tree-ssa/pr83648.c: New test.
* gcc.dg/tree-ssa/pr83648-2.c: Likewise.

From-SVN: r260250
gcc/ChangeLog
gcc/ipa-pure-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr83648-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr83648.c [new file with mode: 0644]