[Bug middle-end/56098] [4.6/4.7/4.8 Regression] conditional write through volatile pointer produces unintended read
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 25 20:04:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56098
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-25 20:04:01 UTC ---
Author: jakub
Date: Fri Jan 25 20:03:54 2013
New Revision: 195475
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195475
Log:
PR tree-optimization/56098
* tree-ssa-phiopt.c (nt_init_block): Don't call add_or_mark_expr
for stmts with volatile ops.
(cond_store_replacement): Don't optimize if assign has volatile ops.
(cond_if_else_store_replacement_1): Don't optimize if either
then_assign or else_assign have volatile ops.
(hoist_adjacent_loads): Don't optimize if either def1 or def2 have
volatile ops.
* gcc.dg/pr56098-1.c: New test.
* gcc.dg/pr56098-2.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr56098-1.c
trunk/gcc/testsuite/gcc.dg/pr56098-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-phiopt.c
More information about the Gcc-bugs
mailing list