From b2d2adc6259b00c8e432f7160c39eca325b4fe02 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 23 Jan 2012 10:52:57 +0000 Subject: re PR middle-end/51949 (expand_call: seg fault caused by IPA split) 2012-01-23 Richard Guenther PR tree-optimization/51949 * ipa-split.c (execute_split_functions): Do not split malloc functions. * gcc.dg/torture/pr51949.c: New testcase. From-SVN: r183424 --- gcc/ipa-split.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/ipa-split.c') diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 09e04af..124098ce 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1395,10 +1395,11 @@ execute_split_functions (void) int todo = 0; struct cgraph_node *node = cgraph_get_node (current_function_decl); - if (flags_from_decl_or_type (current_function_decl) & ECF_NORETURN) + if (flags_from_decl_or_type (current_function_decl) + & (ECF_NORETURN|ECF_MALLOC)) { if (dump_file) - fprintf (dump_file, "Not splitting: noreturn function.\n"); + fprintf (dump_file, "Not splitting: noreturn/malloc function.\n"); return 0; } if (MAIN_NAME_P (DECL_NAME (current_function_decl))) -- cgit v1.1