aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-12-08 18:46:53 +0000
committerGitHub <noreply@github.com>2022-12-08 18:46:53 +0000
commitb36e8cac9faaa245baa3c0579a6584d375f24e2c (patch)
treecb04188322a6d489b1c1811b4a94c8d2dfcbd8e1 /gcc/rust/backend/rust-compile-expr.cc
parent038e11c3eeb4eb36f8894829af6299abb70f3e04 (diff)
parenta2ae23a9f2703519ab0e0709ca9785005c1ed872 (diff)
downloadgcc-b36e8cac9faaa245baa3c0579a6584d375f24e2c.zip
gcc-b36e8cac9faaa245baa3c0579a6584d375f24e2c.tar.gz
gcc-b36e8cac9faaa245baa3c0579a6584d375f24e2c.tar.bz2
Merge #1685
1685: Backport 1656 r=CohenArthur a=CohenArthur Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r--gcc/rust/backend/rust-compile-expr.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index e50df63..8df34c2 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -2278,13 +2278,13 @@ CompileExpr::type_cast_expression (tree type_to_cast_to, tree expr_tree,
}
else if (TREE_CODE (type_to_cast_to) == INTEGER_TYPE)
{
- tree cast = fold (convert_to_integer (type_to_cast_to, expr_tree));
+ tree cast = convert_to_integer (type_to_cast_to, expr_tree);
// FIXME check for TREE_OVERFLOW?
return cast;
}
else if (TREE_CODE (type_to_cast_to) == REAL_TYPE)
{
- tree cast = fold (convert_to_real (type_to_cast_to, expr_tree));
+ tree cast = convert_to_real (type_to_cast_to, expr_tree);
// FIXME
// We might need to check that the tree is MAX val and thusly saturate it
// to inf. we can get the bounds and check the value if its >= or <= to
@@ -2295,12 +2295,12 @@ CompileExpr::type_cast_expression (tree type_to_cast_to, tree expr_tree,
}
else if (TREE_CODE (type_to_cast_to) == COMPLEX_TYPE)
{
- return fold (convert_to_complex (type_to_cast_to, expr_tree));
+ return convert_to_complex (type_to_cast_to, expr_tree);
}
else if (TREE_CODE (type_to_cast_to) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (expr_tree)) == INTEGER_TYPE)
{
- return fold (convert_to_pointer (type_to_cast_to, expr_tree));
+ return convert_to_pointer (type_to_cast_to, expr_tree);
}
else if (TREE_CODE (type_to_cast_to) == RECORD_TYPE
|| TREE_CODE (type_to_cast_to) == ARRAY_TYPE)