aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-pure-const.c
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2007-10-26 09:08:05 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-10-26 09:08:05 +0200
commiteb80272af11c09868c5cfa30cb6af8e08afa977c (patch)
tree1f1998b89b39b08905a1aa1d8835d27810441036 /gcc/ipa-pure-const.c
parent70c0cfc9e5597eabc45d62f139d2d9a9bfd156e4 (diff)
downloadgcc-eb80272af11c09868c5cfa30cb6af8e08afa977c.zip
gcc-eb80272af11c09868c5cfa30cb6af8e08afa977c.tar.gz
gcc-eb80272af11c09868c5cfa30cb6af8e08afa977c.tar.bz2
ipa-pure-const.c (check_decl): Return immediately when pure_const_state has been set to IPA_NEITHER.
* ipa-pure-const.c (check_decl): Return immediately when pure_const_state has been set to IPA_NEITHER. From-SVN: r129644
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r--gcc/ipa-pure-const.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 519b402..d3b880a 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -114,7 +114,10 @@ check_decl (funct_state local,
are CHECKING_WRITE, this cannot be a pure or constant
function. */
if (checking_write)
- local->pure_const_state = IPA_NEITHER;
+ {
+ local->pure_const_state = IPA_NEITHER;
+ return;
+ }
if (DECL_EXTERNAL (t) || TREE_PUBLIC (t))
{