2010-05-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44050
* tree-inline.c (tree_function_versioning): Clone the ipa-pta
flag.
* gcc.dg/torture/pr44050.c: New testcase.
From-SVN: r159214
+2010-05-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44050
+ * tree-inline.c (tree_function_versioning): Clone the ipa-pta
+ flag.
+
2010-05-10 Wei Guozhi <carrot@google.com>
PR target/42879
+2010-05-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44050
+ * gcc.dg/torture/pr44050.c: New testcase.
+
2010-05-10 Wei Guozhi <carrot@google.com>
PR target/42879
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-fno-tree-pta" } */
+
+static void __attribute__((noinline))
+foo (int *i, int n)
+{
+ *i = n;
+}
+
+int
+main (void)
+{
+ int i = 0;
+ foo (&i, 1);
+
+ if (i != 1)
+ __builtin_abort ();
+
+ return 0;
+}
+
(DECL_STRUCT_FUNCTION (old_decl));
initialize_cfun (new_decl, old_decl,
old_entry_block->count);
+ DECL_STRUCT_FUNCTION (new_decl)->gimple_df->ipa_pta
+ = id.src_cfun->gimple_df->ipa_pta;
push_cfun (DECL_STRUCT_FUNCTION (new_decl));
/* Copy the function's static chain. */