diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-pure-const.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr49217.c | 26 |
4 files changed, 38 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0dfe67a0f1d..d573409707d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-29 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/49217 + * ipa-pure-const.c (propagate_pure_const): Fix typos. + 2011-05-28 Jan Hubicka <jh@suse.cz> * lto-streamer-out.c (hash_string_slot_node): Hash string based on its diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 4034d57621d..74cf52a896e 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1225,7 +1225,7 @@ propagate_pure_const (void) break; /* Now process the indirect call. */ - for (ie = node->indirect_calls; ie; ie = ie->next_callee) + for (ie = w->indirect_calls; ie; ie = ie->next_callee) { enum pure_const_state_e edge_state = IPA_CONST; bool edge_looping = false; @@ -1248,7 +1248,7 @@ propagate_pure_const (void) break; /* And finally all loads and stores. */ - for (i = 0; ipa_ref_list_reference_iterate (&node->ref_list, i, ref); i++) + for (i = 0; ipa_ref_list_reference_iterate (&w->ref_list, i, ref); i++) { enum pure_const_state_e ref_state = IPA_CONST; bool ref_looping = false; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eb55295310e..ffd768192c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-29 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/49217 + * gcc.dg/torture/pr49217.c: New testcase. + 2011-05-29 Ira Rosen <ira.rosen@linaro.org> PR testsuite/49222 diff --git a/gcc/testsuite/gcc.dg/torture/pr49217.c b/gcc/testsuite/gcc.dg/torture/pr49217.c new file mode 100644 index 00000000000..e8a89de8f5d --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr49217.c @@ -0,0 +1,26 @@ +/* { dg-do run } */ +/* { dg-options "-fno-early-inlining" } */ + +extern void abort (void); +int i; +static void foo(void); +void __attribute__((noinline)) +bar (void) +{ + if (!i) + foo (); +} +static void +foo(void) +{ + i = 1; + bar (); +} +int main() +{ + i = 0; + bar(); + if (i != 1) + abort (); + return 0; +} |