From ba2e294dfbbb6790b8f26e654b487a6aae94a1c7 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 1 Sep 2004 23:07:52 +0000 Subject: [PATCH] tree-tailcall.c (find_tail_calls): Also fail is statement has volatile operands. * tree-tailcall.c (find_tail_calls): Also fail is statement has volatile operands. From-SVN: r86938 --- gcc/ChangeLog | 3 +++ gcc/tree-tailcall.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d0ebc96be0..6341a0d0414 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2004-09-01 Richard Kenner + * tree-tailcall.c (find_tail_calls): Also fail is statement has + volatile operands. + * tree-ssa.c (propagate_into_addr): Properly test for LHR. * doc/c-tree.texi: Document new operands for ARRAY_REF and diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 401a3991468..8c1aabcabb5 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -395,11 +395,12 @@ find_tail_calls (basic_block bb, struct tailcall **ret) if (TREE_CODE (call) == CALL_EXPR) break; - /* If the statement has virtual operands, fail. */ + /* If the statement has virtual or volatile operands, fail. */ ann = stmt_ann (stmt); if (NUM_V_MAY_DEFS (V_MAY_DEF_OPS (ann)) || NUM_V_MUST_DEFS (V_MUST_DEF_OPS (ann)) - || NUM_VUSES (VUSE_OPS (ann))) + || NUM_VUSES (VUSE_OPS (ann)) + || ann->has_volatile_ops) return; }