Commit 46b380a2 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/53085 (writes to volatile struct members is missing)

2012-04-24  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/53085
	* tree-ssa-pre.c (eliminate): Do not eliminate volatile redundant
	stores.

	* g++.dg/torture/pr53085.C: New testcase.

From-SVN: r186764
parent 05232ff6
2012-04-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53085
* tree-ssa-pre.c (eliminate): Do not eliminate volatile redundant
stores.
2012-04-24 Richard Guenther <rguenther@suse.de>
* tree-if-conv.c (main_tree_if_conversion): Move bb under
ENABLE_CHECKING.
......
2012-04-24 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53085
* g++.dg/torture/pr53085.C: New testcase.
2012-04-24 Andrew Pinski <apinski@cavium.com>
PR tree-opt/33512
......
// { dg-do compile }
// { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } }
// { dg-options "-fdump-tree-optimized" }
class aa{
void f();
private:
volatile int a;
};
void aa::f(){
a=1;
a=1;
}
// { dg-final { scan-tree-dump-times "a ={v} 1;" 2 "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
......@@ -4409,6 +4409,7 @@ eliminate (void)
has the same value number as its rhs. If so, the store is
dead. */
else if (gimple_assign_single_p (stmt)
&& !gimple_has_volatile_ops (stmt)
&& !is_gimple_reg (gimple_assign_lhs (stmt))
&& (TREE_CODE (rhs) == SSA_NAME
|| is_gimple_min_invariant (rhs)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment