Commit 1755aad0 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/44050 (Wrong code is produced with -fipa-pta -fno-tree-pta)

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
parent 333b67a9
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> 2010-05-10 Wei Guozhi <carrot@google.com>
PR target/42879 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> 2010-05-10 Wei Guozhi <carrot@google.com>
PR target/42879 PR target/42879
......
/* { 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;
}
...@@ -4924,6 +4924,8 @@ tree_function_versioning (tree old_decl, tree new_decl, ...@@ -4924,6 +4924,8 @@ tree_function_versioning (tree old_decl, tree new_decl,
(DECL_STRUCT_FUNCTION (old_decl)); (DECL_STRUCT_FUNCTION (old_decl));
initialize_cfun (new_decl, old_decl, initialize_cfun (new_decl, old_decl,
old_entry_block->count); 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)); push_cfun (DECL_STRUCT_FUNCTION (new_decl));
/* Copy the function's static chain. */ /* Copy the function's static chain. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment