aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-01-23 10:52:57 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-01-23 10:52:57 +0000
commitb2d2adc6259b00c8e432f7160c39eca325b4fe02 (patch)
treefc1874af8abcf5e4423c3f78ff353255e3287f3a /gcc/ipa-split.c
parentdd91386dc6b2e7748d47818955ac416ff0fc1f84 (diff)
downloadgcc-b2d2adc6259b00c8e432f7160c39eca325b4fe02.zip
gcc-b2d2adc6259b00c8e432f7160c39eca325b4fe02.tar.gz
gcc-b2d2adc6259b00c8e432f7160c39eca325b4fe02.tar.bz2
re PR middle-end/51949 (expand_call: seg fault caused by IPA split)
2012-01-23 Richard Guenther <rguenther@suse.de> 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
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c5
1 files changed, 3 insertions, 2 deletions
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)))