diff options
author | Richard Guenther <rguenther@suse.de> | 2012-01-23 10:52:57 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2012-01-23 10:52:57 +0000 |
commit | 5f47713011fbcf4d1c9b472fb65cc6925e05ff10 (patch) | |
tree | fc1874af8abcf5e4423c3f78ff353255e3287f3a /gcc/ipa-split.c | |
parent | 82db8d17f0bd8132b523e01c4a6b525ae07b9f16 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@183424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index 09e04af5b88..124098ce669 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))) |