Commit 32919a0d by Richard Kenner Committed by Richard Kenner

expr.c (expand_expr, [...]): Don't check for checking memory usage if not in a function.

	* expr.c (expand_expr, case COMPONENT_REF): Don't check for checking
	memory usage if not in a function.
	* varasm.c (initializer_constant_valid_p, case ADDR_EXPR): Only
	return address if static.

From-SVN: r33629
parent d9a7d592
Wed May 3 09:29:17 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (expand_expr, case COMPONENT_REF): Don't check for checking
memory usage if not in a function.
* varasm.c (initializer_constant_valid_p, case ADDR_EXPR): Only
return address if static.
Wed May 3 13:14:49 MET DST 2000 Jan Hubicka <jh@suse.cz>
* ifcvt.c (noce_try_cmove_arith): Use may_trap_p to thest
......
......@@ -6734,7 +6734,8 @@ expand_expr (exp, target, tmode, modifier)
}
/* Check the access. */
if (current_function_check_memory_usage && GET_CODE (op0) == MEM)
if (cfun != 0 && current_function_check_memory_usage
&& GET_CODE (op0) == MEM)
{
enum memory_use_mode memory_usage;
memory_usage = get_memory_usage_from_modifier (modifier);
......
......@@ -4068,7 +4068,7 @@ initializer_constant_valid_p (value, endtype)
return null_pointer_node;
case ADDR_EXPR:
return TREE_OPERAND (value, 0);
return staticp (TREE_OPERAND (value, 0) ? TREE_OPERAND (value, 0) : 0);
case NON_LVALUE_EXPR:
return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment