From e9f91f6220e75cceed0abfe663bdf8d9ff51682b Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Sun, 9 Sep 2007 16:23:26 +0000 Subject: [PATCH] tree-ssa-operands.c (add_virtual_operand): Only mark stores as has_volatile_ops if alias information is not available. 2007-09-09 Richard Guenther * tree-ssa-operands.c (add_virtual_operand): Only mark stores as has_volatile_ops if alias information is not available. * gcc.c-torture/compile/20070906-1.c: New testcase. From-SVN: r128300 --- gcc/ChangeLog | 5 +++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/compile/20070906-1.c | 8 ++++++++ gcc/tree-ssa-operands.c | 3 ++- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20070906-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0aa727d1091..ff54c468366 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-09-09 Richard Guenther + + * tree-ssa-operands.c (add_virtual_operand): Only mark + stores as has_volatile_ops if alias information is not available. + 2007-09-09 Revital Eres * doc/contrib.texi: Add myself. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3772b7bbf36..02fc4ac632f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-09-09 Richard Guenther + + * gcc.c-torture/compile/20070906-1.c: New testcase. + 2007-09-09 Ira Rosen * gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: Add diff --git a/gcc/testsuite/gcc.c-torture/compile/20070906-1.c b/gcc/testsuite/gcc.c-torture/compile/20070906-1.c new file mode 100644 index 00000000000..bec983f24ce --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20070906-1.c @@ -0,0 +1,8 @@ +struct Bar { + int i[8]; +}; +struct Bar foo(struct Bar **p) +{ + return foo((struct Bar**)*p); +} + diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index a3e34ecc766..3562e712137 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -1511,7 +1511,8 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, if (aliases == NULL) { - if (!gimple_aliases_computed_p (cfun)) + if (!gimple_aliases_computed_p (cfun) + && (flags & opf_def)) s_ann->has_volatile_ops = true; /* The variable is not aliased or it is an alias tag. */ -- 2.30.2