diff options
author | Martin Liska <mliska@suse.cz> | 2020-02-18 14:39:41 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-02-18 14:39:41 +0100 |
commit | 33351ff9faa21c4c1af377d661a52ac0ce366db3 (patch) | |
tree | 7d760e87a084594b68ebff4ced557ee2ffb57460 /gcc/ipa-param-manipulation.c | |
parent | ea0b12523d0d9a9059b5173ce9653b92ddfb284f (diff) | |
download | gcc-33351ff9faa21c4c1af377d661a52ac0ce366db3.zip gcc-33351ff9faa21c4c1af377d661a52ac0ce366db3.tar.gz gcc-33351ff9faa21c4c1af377d661a52ac0ce366db3.tar.bz2 |
Drop MALLOC attribute for void functions.
PR ipa/93583
* cgraph.c (cgraph_node::verify_node): Verify MALLOC attribute
and return type of functions.
* ipa-param-manipulation.c (ipa_param_adjustments::adjust_decl):
Drop MALLOC attribute for void functions.
* ipa-pure-const.c (funct_state_summary_t::duplicate): Drop
malloc_state for a new VOID clone.
PR ipa/93583
* gcc.dg/ipa/pr93583.c: New test.
Diffstat (limited to 'gcc/ipa-param-manipulation.c')
-rw-r--r-- | gcc/ipa-param-manipulation.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ipa-param-manipulation.c b/gcc/ipa-param-manipulation.c index 19ec873..839bd2e 100644 --- a/gcc/ipa-param-manipulation.c +++ b/gcc/ipa-param-manipulation.c @@ -410,6 +410,10 @@ ipa_param_adjustments::adjust_decl (tree orig_decl) DECL_VIRTUAL_P (new_decl) = 0; DECL_LANG_SPECIFIC (new_decl) = NULL; + /* Drop MALLOC attribute for a void function. */ + if (m_skip_return) + DECL_IS_MALLOC (new_decl) = 0; + return new_decl; } |