tree-tailcall.c (find_tail_calls): Also fail is statement has volatile operands.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Wed, 1 Sep 2004 23:07:52 +0000 (23:07 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 1 Sep 2004 23:07:52 +0000 (19:07 -0400)
* tree-tailcall.c (find_tail_calls): Also fail is statement has
volatile operands.

From-SVN: r86938

gcc/ChangeLog
gcc/tree-tailcall.c

index 1d0ebc96be0839cc1758145be2cc41dd9209adf0..6341a0d04146df353090a6ec4b58a622b17803c9 100644 (file)
@@ -1,5 +1,8 @@
 2004-09-01  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * 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
index 401a3991468b6133d7ecd65f775a204a4b6fac39..8c1aabcabb52865720ef08f9444201170be2468a 100644 (file)
@@ -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;
     }