]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-10-02 Martin Jambor <mjambor@suse.cz>
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Oct 2014 16:49:14 +0000 (16:49 +0000)
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Oct 2014 16:49:14 +0000 (16:49 +0000)
PR tree-optimization/63375
* tree-sra.c (build_access_from_expr_1): Disqualify volatile
references.

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

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))
     {