summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-18 19:36:01 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-18 19:36:01 +0000
commita9d9ab08e44531dc708dfa385147c321643b86fc (patch)
treee65409914fec6e66c9baf2b8cc7705fd81ee165a /gcc/emit-rtl.c
parent61ef20483a810bfb77b1e742557fc5624c4f39d2 (diff)
downloadgcc-a9d9ab08e44531dc708dfa385147c321643b86fc.tar.gz
* tree.h (TYPE_ALIGN_OK): New flag.
* emit-rtl.c (set_mem_attributes): Handle it. * expr.c (emit_single_push_insn): Only set to alias set 0 if doing sibcall optimization. (expand_expr, case COMPONENT_REF): Call set_mem_attributes on case when make temporary. (expand_expr, case CONVERT_EXPR): Simplify convert-to-union case. (expand_expr, case ADDR_EXPR): Abort if TYPE_ALIGN_OK and need copy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47149 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 9ad98f02cb4..ec2e4f372e1 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1699,10 +1699,10 @@ set_mem_attributes (ref, t, objectp)
if ((objectp || DECL_P (t)) && ! AGGREGATE_TYPE_P (type))
MEM_SCALAR_P (ref) = 1;
- /* We can set the alignment from the type if we are makign an object or
- if this is an INDIRECT_REF. */
- if (objectp || TREE_CODE (t) == INDIRECT_REF)
- align = TYPE_ALIGN (type);
+ /* We can set the alignment from the type if we are making an object,
+ this is an INDIRECT_REF, or if TYPE_ALIGN_OK. */
+ if (objectp || TREE_CODE (t) == INDIRECT_REF || TYPE_ALIGN_OK (type))
+ align = MAX (align, TYPE_ALIGN (type));
/* If the size is known, we can set that. */
if (TYPE_SIZE_UNIT (type) && host_integerp (TYPE_SIZE_UNIT (type), 1))