return tmp_var;
}
+/* Like build_simple_mem_ref, but set TREE_THIS_NOTRAP on the result. */
+
+static tree
+build_simple_mem_ref_notrap (tree ptr)
+{
+ tree t = build_simple_mem_ref (ptr);
+ TREE_THIS_NOTRAP (t) = 1;
+ return t;
+}
+
/* Take the address of EXP to be used within function CONTEXT.
Mark it for addressability as necessary. */
{
tree field = get_chain_field (i);
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
x = init_tmp_var (info, x, gsi);
}
{
tree field = get_chain_field (i);
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
x = init_tmp_var (info, x, gsi);
}
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
}
x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
for (i = info->outer; i->context != target_context; i = i->outer)
{
field = get_chain_field (i);
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
}
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
}
field = lookup_field_for_decl (i, decl, INSERT);
x = build3 (COMPONENT_REF, TREE_TYPE (field), x, field, NULL_TREE);
if (use_pointer_in_frame (decl))
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
/* ??? We should be remapping types as well, surely. */
new_decl = build_decl (DECL_SOURCE_LOCATION (decl),
if (use_pointer_in_frame (t))
{
x = init_tmp_var (info, x, &wi->gsi);
- x = build_simple_mem_ref (x);
+ x = build_simple_mem_ref_notrap (x);
}
}