aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.cc')
-rw-r--r--gcc/rust/backend/rust-compile-base.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc
index b969b7a..928306f 100644
--- a/gcc/rust/backend/rust-compile-base.cc
+++ b/gcc/rust/backend/rust-compile-base.cc
@@ -317,7 +317,7 @@ HIRCompileBase::mark_addressable (tree exp, Location locus)
}
tree
-HIRCompileBase::address_expression (tree expr, Location location)
+HIRCompileBase::address_expression (tree expr, tree ptrtype, Location location)
{
if (expr == error_mark_node)
return error_mark_node;
@@ -325,7 +325,8 @@ HIRCompileBase::address_expression (tree expr, Location location)
if (!mark_addressable (expr, location))
return error_mark_node;
- return build_fold_addr_expr_loc (location.gcc_location (), expr);
+ return build_fold_addr_expr_with_type_loc (location.gcc_location (), expr,
+ ptrtype);
}
std::vector<Bvariable *>