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
This commit is contained in:
parent
333b67a9f1
commit
1755aad094
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/* { 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,
|
|||
(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. */
|
||||
|
|
Loading…
Reference in New Issue