diff options
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r-- | gcc/ipa-pure-const.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 519b402df20..d3b880adc83 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)) { |