aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-08-11 16:15:35 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-08-11 16:15:35 +0100
commit2f15ae7493579ac55d2a1e11ece43abaf4e1bc06 (patch)
treefa7834d0e5c73209707eb7d3604ce85a583b9bc7
parent70a0039b82b3419820359c8a1552470e48b458f6 (diff)
downloadgcc-2f15ae7493579ac55d2a1e11ece43abaf4e1bc06.zip
gcc-2f15ae7493579ac55d2a1e11ece43abaf4e1bc06.tar.gz
gcc-2f15ae7493579ac55d2a1e11ece43abaf4e1bc06.tar.bz2
Revert "Ensure we set TREE_SIDE_EFFECTS on call expressions"
This reverts commit f891a13aa2af912584176d2c595c295b77ff5ff9. This fix ensures the code is added to the block but still as the artifical function is marked READONLY it ends up being optimized out anyway.
-rw-r--r--gcc/rust/rust-gcc.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index c8eee0f..66fd8bc 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -1840,9 +1840,6 @@ Gcc_backend::call_expression (tree fn, const std::vector<tree> &fn_args,
ret = build1_loc (location.gcc_location (), NOP_EXPR, rettype, ret);
}
- if (!TREE_SIDE_EFFECTS (ret))
- TREE_SIDE_EFFECTS (ret) = TREE_SIDE_EFFECTS (fndecl);
-
delete[] args;
return ret;
}