mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-06 00:40:22 +08:00
re PR tree-optimization/23584 (ipa-pure-const pass ignores dereferencing a volatile pointer type)
PR middle-end/23584 * ipa-pure-const.c (check_tree): Check for volatile-ness when considering a dereference. From-SVN: r103546
This commit is contained in:
parent
24b7d7c318
commit
1b0d2d1789
@ -1,3 +1,9 @@
|
||||
2005-08-26 Josh Conner <jconner@apple.com>
|
||||
|
||||
PR middle-end/23584
|
||||
* ipa-pure-const.c (check_tree): Check for volatile-ness
|
||||
when considering a dereference.
|
||||
|
||||
2005-08-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* rtl.h (MEM_IN_STRUCT_P): Fix comment typo.
|
||||
|
@ -182,12 +182,13 @@ check_tree (funct_state local, tree t, bool checking_write)
|
||||
|
||||
/* Any indirect reference that occurs on the lhs
|
||||
disqualifies the function from being pure or const. Any
|
||||
indirect reference that occurs on the rhs disqualifies
|
||||
the function from being const. */
|
||||
if (checking_write)
|
||||
indirect reference to a volatile disqualifies the
|
||||
function from being pure or const. Any indirect
|
||||
reference that occurs on the rhs disqualifies the
|
||||
function from being const. */
|
||||
if (checking_write || TREE_THIS_VOLATILE (t))
|
||||
local->pure_const_state = IPA_NEITHER;
|
||||
else
|
||||
if (local->pure_const_state == IPA_CONST)
|
||||
else if (local->pure_const_state == IPA_CONST)
|
||||
local->pure_const_state = IPA_PURE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user