auto fndecl = compile_intrinsic_function (ctx, fntype);
+ // Most intrinsic functions are pure - not `move_val_init`
+ TREE_READONLY (fndecl) = 0;
+ TREE_SIDE_EFFECTS (fndecl) = 1;
+
// get the template parameter type tree fn size_of<T>();
rust_assert (fntype->get_num_substitutions () == 1);
auto ¶m_mapping = fntype->get_substs ().at (0);
src = build_fold_addr_expr_loc (BUILTINS_LOCATION, src);
tree memset_call = build_call_expr_loc (BUILTINS_LOCATION, memcpy_builtin, 3,
dst, src, size);
- TREE_READONLY (memset_call) = 0;
- TREE_SIDE_EFFECTS (memset_call) = 1;
ctx->add_statement (memset_call);
// BUILTIN size_of FN BODY END