re PR rtl-optimization/63375 (reordering of reads across fences)
authorMartin Jambor <mjambor@suse.cz>
Thu, 2 Oct 2014 16:49:14 +0000 (18:49 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 2 Oct 2014 16:49:14 +0000 (18:49 +0200)
2014-10-02  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/63375
* tree-sra.c (build_access_from_expr_1): Disqualify volatile
references.

From-SVN: r215804

gcc/ChangeLog
gcc/tree-sra.c

index 6546ff138e289814f62f26d7d2860c6347243bf0..e330d18ae4b4c1fb299cb4e65f7078e5d4241d2b 100644 (file)
@@ -1,3 +1,9 @@
+2014-10-02  Martin Jambor  <mjambor@suse.cz>
+
+       PR tree-optimization/63375
+       * tree-sra.c (build_access_from_expr_1): Disqualify volatile
+       references.
+
 2014-10-02  Olivier Hainque  <hainque@adacore.com>
 
        * Makefile.in (CROSS): Define, to @CROSS.
index 8259dbaa316db43e917b28812e7ebea7100a9197..fb24114fa6b7dfd9c6dcea369b1199e5b34d8f67 100644 (file)
@@ -1064,6 +1064,11 @@ build_access_from_expr_1 (tree expr, gimple stmt, bool write)
                               "component.");
       return NULL;
     }
+  if (TREE_THIS_VOLATILE (expr))
+    {
+      disqualify_base_of_expr (expr, "part of a volatile reference.");
+      return NULL;
+    }
 
   switch (TREE_CODE (expr))
     {