aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-pure-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r--gcc/ipa-pure-const.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 054f359..4c47eec 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -1973,7 +1973,8 @@ propagate_malloc (void)
funct_state l = funct_state_summaries->get (node);
if (!node->alias
&& l->malloc_state == STATE_MALLOC
- && !node->inlined_to)
+ && !node->inlined_to
+ && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (node->decl))))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Function %s found to be malloc\n",