From 252c1a465c2b12af14649a30fdf73fbd5d24b66d Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Thu, 2 Oct 2014 18:49:14 +0200 Subject: [PATCH] re PR rtl-optimization/63375 (reordering of reads across fences) 2014-10-02 Martin Jambor PR tree-optimization/63375 * tree-sra.c (build_access_from_expr_1): Disqualify volatile references. From-SVN: r215804 --- gcc/ChangeLog | 6 ++++++ gcc/tree-sra.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6546ff138e2..e330d18ae4b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-02 Martin Jambor + + PR tree-optimization/63375 + * tree-sra.c (build_access_from_expr_1): Disqualify volatile + references. + 2014-10-02 Olivier Hainque * Makefile.in (CROSS): Define, to @CROSS. diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 8259dbaa316..fb24114fa6b 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -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)) { -- 2.30.2