aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-10-14 21:19:05 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-10-14 21:19:05 +0000
commita3b885703b3f06403067eae7ff54f6826b6a5e08 (patch)
tree770e70e8378f7c6f20a975a6e92e056f9a8f584b /gcc/alias.c
parent77631fa7edc6a2b6c4177c0f7a3b1eb454e372c3 (diff)
downloadgcc-a3b885703b3f06403067eae7ff54f6826b6a5e08.zip
gcc-a3b885703b3f06403067eae7ff54f6826b6a5e08.tar.gz
gcc-a3b885703b3f06403067eae7ff54f6826b6a5e08.tar.bz2
re PR rtl-optimization/6631 (Miscompiled structure access)
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. From-SVN: r58136
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 914b153..ca560b69 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1,5 +1,5 @@
/* Alias analysis for GNU C
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by John Carr (jfc@mit.edu).
This file is part of GCC.
@@ -332,8 +332,8 @@ objects_must_conflict_p (t1, t2)
then they may not conflict. */
if ((t1 != 0 && readonly_fields_p (t1))
|| (t2 != 0 && readonly_fields_p (t2))
- || (t1 != 0 && TYPE_READONLY (t1))
- || (t2 != 0 && TYPE_READONLY (t2)))
+ || (t1 != 0 && lang_hooks.honor_readonly && TYPE_READONLY (t1))
+ || (t2 != 0 && lang_hooks.honor_readonly && TYPE_READONLY (t2)))
return 0;
/* If they are the same type, they must conflict. */