aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-pure-const.c
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2018-05-15 04:44:33 +0000
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>2018-05-15 04:44:33 +0000
commit0fac5f2a7f15974deabf6432f4f510d0f4bcc6bc (patch)
tree8f4a374e2fe65e6e08730920207a99968ad8fe0c /gcc/ipa-pure-const.c
parenta25c2c79667effe27af171e91818fa757ffb0029 (diff)
downloadgcc-0fac5f2a7f15974deabf6432f4f510d0f4bcc6bc.zip
gcc-0fac5f2a7f15974deabf6432f4f510d0f4bcc6bc.tar.gz
gcc-0fac5f2a7f15974deabf6432f4f510d0f4bcc6bc.tar.bz2
re PR ipa/85734 (--suggest-attribute=malloc misdiagnoses static functions)
2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> PR ipa/85734 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param as true in call to suggest_attribute. testsuite/ * gcc.dg/ipa/pr85734.c: New test. From-SVN: r260249
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r--gcc/ipa-pure-const.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index a80b684..7665358 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -249,7 +249,7 @@ warn_function_malloc (tree decl)
static hash_set<tree> *warned_about;
warned_about
= suggest_attribute (OPT_Wsuggest_attribute_malloc, decl,
- false, warned_about, "malloc");
+ true, warned_about, "malloc");
}
/* Emit suggestion about __attribute__((noreturn)) for DECL. */