diff options
author | Jason Merrill <jason@redhat.com> | 2001-08-22 10:53:20 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-08-22 10:53:20 -0400 |
commit | 23ac7d7e6cf498682f10f41ca85ea2981ec53c26 (patch) | |
tree | 4bd5e8caffe00fb80b6c35339582c999062a2e3f /gcc | |
parent | 2270623af33a51bb6776a775bee05f142db83e7c (diff) | |
download | gcc-23ac7d7e6cf498682f10f41ca85ea2981ec53c26.zip gcc-23ac7d7e6cf498682f10f41ca85ea2981ec53c26.tar.gz gcc-23ac7d7e6cf498682f10f41ca85ea2981ec53c26.tar.bz2 |
explow.c (set_mem_attributes): Avoid returning a bogus alias set from a new MEM.
* explow.c (set_mem_attributes): Avoid returning a bogus alias set
from a new MEM.
From-SVN: r45108
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/explow.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4948e50..b180df7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2001-08-22 Jason Merrill <jason_merrill@redhat.com> + * explow.c (set_mem_attributes): Avoid returning a bogus alias set + from a new MEM. + * jump.c (squeeze_notes): Take parms by reference. Handle END being a squeezable note. * rtl.h: Adjust. diff --git a/gcc/explow.c b/gcc/explow.c index 3a7716f..d01067d 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -670,7 +670,16 @@ set_mem_attributes (ref, t, objectp) here, because, in C and C++, the fact that a location is accessed through a const expression does not mean that the value there can never change. */ + + /* If we have already set DECL_RTL = ref, get_alias_set will get the + wrong answer, as it assumes that DECL_RTL already has the right alias + info. Callers should not set DECL_RTL until after the call to + set_mem_attributes. */ + if (DECL_P (t) && ref == DECL_RTL_IF_SET (t)) + abort (); + set_mem_alias_set (ref, get_alias_set (t)); + MEM_VOLATILE_P (ref) = TYPE_VOLATILE (type); MEM_IN_STRUCT_P (ref) = AGGREGATE_TYPE_P (type); |