From 25763d80f298a3ff04571a01db5d6f215a936145 Mon Sep 17 00:00:00 2001 From: mmitchel Date: Mon, 14 Oct 2002 21:19:05 +0000 Subject: PR optimization/6631 * Makefile.in (function.o): Depend on langhooks.h. * alias.c (objects_must_conflict_p): Check honor_readonly when examining TYPE_READONLY. * function.c (assign_stack_temp_for_type): Likewise. PR optimization/6631 * g++.dg/opt/const2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58136 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/function.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 479ecef4141..0c066ed0358 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -798,7 +798,8 @@ assign_stack_temp_for_type (mode, size, keep, type) /* If a type is specified, set the relevant flags. */ if (type != 0) { - RTX_UNCHANGING_P (slot) = TYPE_READONLY (type); + RTX_UNCHANGING_P (slot) = (lang_hooks.honor_readonly + && TYPE_READONLY (type)); MEM_VOLATILE_P (slot) = TYPE_VOLATILE (type); MEM_SET_IN_STRUCT_P (slot, AGGREGATE_TYPE_P (type)); } -- cgit v1.2.1