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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183424
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-01-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51949
+ * ipa-split.c (execute_split_functions): Do not split malloc
+ functions.
+
2012-01-23 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/51933
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)))
+2012-01-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51949
+ * gcc.dg/torture/pr51949.c: New testcase.
+
2012-01-23 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/51933
--- /dev/null
+/* { dg-do compile } */
+
+typedef long unsigned int size_t;
+extern __attribute__ ((malloc)) void *mem_alloc(size_t);
+void *mem_alloc(size_t amount)
+{
+ void *q = __builtin_malloc (amount);
+ if (!q) {
+ __builtin_printf("malloc");
+ __builtin_exit(255);
+ }
+}
+void mem_realloc()
+{
+ mem_alloc(1);
+}
+void put_env_var()
+{
+ mem_alloc(1);
+}