OSDN Git Service

2012-01-27 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jan 2012 15:49:34 +0000 (15:49 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jan 2012 15:49:34 +0000 (15:49 +0000)
* ipa-pure-const.c (check_stmt): Clobbers do not make a
function non-const/pure.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183632 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-pure-const.c

index 009203b..60bc0a9 100644 (file)
@@ -1,5 +1,10 @@
 2012-01-27  Richard Guenther  <rguenther@suse.de>
 
+       * ipa-pure-const.c (check_stmt): Clobbers do not make a
+       function non-const/pure.
+
+2012-01-27  Richard Guenther  <rguenther@suse.de>
+
        PR tree-optimization/50444
        * tree-sra.c (build_ref_for_offset): Properly adjust the
        MEM_REF type for unaligned accesses.
index 82e24cf..e8b21f9 100644 (file)
@@ -652,7 +652,8 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
       print_gimple_stmt (dump_file, stmt, 0, 0);
     }
 
-  if (gimple_has_volatile_ops (stmt))
+  if (gimple_has_volatile_ops (stmt)
+      && !gimple_clobber_p (stmt))
     {
       local->pure_const_state = IPA_NEITHER;
       if (dump_file)