2012-09-20 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Sep 2012 14:46:32 +0000 (14:46 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Sep 2012 14:46:32 +0000 (14:46 +0000)
PR tree-optimization/54634
* tree-data-ref.c (get_references_in_stmt): For now give
up for pure functions.

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

gcc/ChangeLog
gcc/tree-data-ref.c

index 8223bef..e526b91 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-20  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/54634
+       * tree-data-ref.c (get_references_in_stmt): For now give
+       up for pure functions.
+
 2012-09-20  Chen Wei-Ren  <chenwj@iis.sinica.edu.tw>
 
        doc/lto.texi: Correct typo.
index 4f6df91..0d647d7 100644 (file)
@@ -4307,10 +4307,10 @@ get_references_in_stmt (gimple stmt, VEC (data_ref_loc, heap) **references)
   *references = NULL;
 
   /* ASM_EXPR and CALL_EXPR may embed arbitrary side effects.
-     Calls have side-effects, except those to const or pure
-     functions.  */
+     As we cannot model data-references to not spelled out
+     accesses give up if they may occur.  */
   if ((stmt_code == GIMPLE_CALL
-       && !(gimple_call_flags (stmt) & (ECF_CONST | ECF_PURE)))
+       && !(gimple_call_flags (stmt) & ECF_CONST))
       || (stmt_code == GIMPLE_ASM
          && (gimple_asm_volatile_p (stmt) || gimple_vuse (stmt))))
     clobbers_memory = true;