re PR ipa/60973 (Invalid propagation of a tail call in devirt pass)
[gcc.git] / gcc / tree-inline.c
index 987e81506b7c969c8a821e4c28f088499f0a10ec..9207e9f7296c96715ae94070b0a79adaf5bef694 100644 (file)
@@ -1483,6 +1483,11 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
       /* Create a new deep copy of the statement.  */
       copy = gimple_copy (stmt);
 
+      /* Clear flags that need revisiting.  */
+      if (is_gimple_call (copy)
+         && gimple_call_tail_p (copy))
+       gimple_call_set_tail (copy, false);
+
       /* Remap the region numbers for __builtin_eh_{pointer,filter},
         RESX and EH_DISPATCH.  */
       if (id->eh_map)