ipa: do not DECL_IS_MALLOC for void fns
authorMartin Liska <mliska@suse.cz>
Wed, 2 Dec 2020 12:01:47 +0000 (13:01 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 2 Dec 2020 14:03:26 +0000 (15:03 +0100)
commitf5850e7da93a6b1e4bec3e8740d08e985433eef3
tree6c704bfc4da1dd95e4417d6735fcae892cefd321
parent694d4a6d0c466d0fbc97920a9c6641a7b349ca35
ipa: do not DECL_IS_MALLOC for void fns

gcc/ChangeLog:

PR ipa/98075
* cgraph.c (cgraph_node::dump): Dump decl_is_malloc flag.
* ipa-pure-const.c (propagate_malloc): Do not set malloc
attribute for void functions.

gcc/testsuite/ChangeLog:

PR ipa/98075
* g++.dg/ipa/pr98075.C: New test.
gcc/cgraph.c
gcc/ipa-pure-const.c
gcc/testsuite/g++.dg/ipa/pr98075.C [new file with mode: 0644]