From aca14577e8d8624fdcde19eafacac16617b6b02e Mon Sep 17 00:00:00 2001
From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 14 Jun 2000 05:30:09 +0000
Subject: 	* tree.h (TYPE_USER_ALIGN, DECL_USER_ALIGN): Define. 
 (struct tree_type, struct tree_decl): Add user_align member. 	*
 stor-layout.c (layout_decl): Set DECL_USER_ALIGN. 	(place_union_field):
 If BIGGEST_FIELD_ALIGNMENT is defined 	and DECL_USER_ALIGN 0, cap alignment
 to this value. 	(place_field): Likewise. 	(finalize_type_size):
 Set TYPE_USER_ALIGN. 	(layout_type): Likewise. 
 (initialize_sizetypes): Likewise. 	* c-common.c (decl_attributes): Set
 TYPE_USER_ALIGN resp. 	DECL_USER_ALIGN to 1. 	* c-decl.c (duplicate_decls):
 Set DECL_USER_ALIGN. 	(xfer_tag): Set TYPE_USER_ALIGN. 
 (finish_struct): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN. 	(finish_enum):
 Likewise. 	* stmt.c (expand_decl): Set DECL_USER_ALIGN. 
 (expand_anon_union_decl): Likewise. 	* tree.c (make_node): Set
 DECL_USER_ALIGN resp. TYPE_USER_ALIGN. 	(build_index_type): Set
 TYPE_USER_ALIGN. 	(build_range_type): Likewise. 
 (build_common_tree_nodes_2): Likewise. 	* tm.texi
 (BIGGEST_FIELD_ALIGNMENT): Document the changed meaning.

ch/:
	* decl.c (init_decl_processing): Set TYPE_USER_ALIGN.
	(layout_enum): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
	* typeck.c (layout_chill_range_type): Set TYPE_USER_ALIGN.
	(apply_chill_field_layout): Set DECL_USER_ALIGN.
	(layout_chill_struct_type): Set TYPE_USER_ALIGN.

cp/:
	* class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
	(check_bitfield_decl, check_field_decl): Likewise.
	(build_vtbl_or_vbase_field, build_base_field): Likewise.
	(layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
	* decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
	(xfer_tag, finish_enum): Likewise.
	* decl2.c (finish_builtin_type): Likewise.
	* init.c (init_init_processing): Likewise.
	* pt.c (instantiate_class_template): Likewise.
	* rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
	* cp-tree.h (struct lang_type): Add user_align member.
	(CLASSTYPE_USER_ALIGN): Define.

f/:
	* com.c (ffecom_transform_common_): Set DECL_USER_ALIGN.
	(ffecom_transform_equiv_, ffecom_decl_field): Likewise.
	(ffecom_init_0): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
	(duplicate_decls): Set DECL_USER_ALIGN.

java/:
	* typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
	* parse.y (java_complete_class): Set DECL_USER_ALIGN.
	* parse.c: Rebuilt.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34541 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/stmt.c | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'gcc/stmt.c')

diff --git a/gcc/stmt.c b/gcc/stmt.c
index 14ce4a9b39e..f97faaa0081 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -3849,6 +3849,7 @@ expand_decl (decl)
       /* Set alignment we actually gave this decl.  */
       DECL_ALIGN (decl) = (DECL_MODE (decl) == BLKmode ? BIGGEST_ALIGNMENT
 			   : GET_MODE_BITSIZE (DECL_MODE (decl)));
+      DECL_USER_ALIGN (decl) = 0;
 
       if (oldaddr)
 	{
@@ -3901,6 +3902,7 @@ expand_decl (decl)
 #else
       DECL_ALIGN (decl) = BIGGEST_ALIGNMENT;
 #endif
+      DECL_USER_ALIGN (decl) = 0;
     }
 }
 
@@ -4204,6 +4206,7 @@ expand_anon_union_decl (decl, cleanup, decl_elts)
 
       /* Propagate the union's alignment to the elements.  */
       DECL_ALIGN (decl_elt) = DECL_ALIGN (decl);
+      DECL_USER_ALIGN (decl_elt) = DECL_USER_ALIGN (decl);
 
       /* If the element has BLKmode and the union doesn't, the union is
          aligned such that the element doesn't need to have BLKmode, so
-- 
cgit v1.2.1