diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 16:42:31 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-16 16:42:31 +0000 |
commit | 84be847e0c6a9e9adb1182c658b0e923813aa48e (patch) | |
tree | fdb0104d729129a4c5eda4602b220107d4c54dde /gcc/cfgcleanup.c | |
parent | e8fdbbc8ec28d74cc54529ea9034a35dde3a5bd7 (diff) | |
download | gcc-84be847e0c6a9e9adb1182c658b0e923813aa48e.tar.gz |
PR rtl-optimization/17723
* cfgcleanup.c (merge_memattrs): Handle case when
MEM_SIZE == NULL_RTX.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index eccaab4605e..089c3303445 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -934,6 +934,8 @@ merge_memattrs (rtx x, rtx y) MEM_ATTRS (x) = 0; else { + rtx mem_size; + if (MEM_ALIAS_SET (x) != MEM_ALIAS_SET (y)) { set_mem_alias_set (x, 0); @@ -952,10 +954,16 @@ merge_memattrs (rtx x, rtx y) set_mem_offset (x, 0); set_mem_offset (y, 0); } - - set_mem_size (x, GEN_INT (MAX (INTVAL (MEM_SIZE (x)), - INTVAL (MEM_SIZE (y))))); - set_mem_size (y, MEM_SIZE (x)); + + if (!MEM_SIZE (x)) + mem_size = NULL_RTX; + else if (!MEM_SIZE (y)) + mem_size = NULL_RTX; + else + mem_size = GEN_INT (MAX (INTVAL (MEM_SIZE (x)), + INTVAL (MEM_SIZE (y)))); + set_mem_size (x, mem_size); + set_mem_size (y, mem_size); set_mem_align (x, MIN (MEM_ALIGN (x), MEM_ALIGN (y))); set_mem_align (y, MEM_ALIGN (x)); |