summaryrefslogtreecommitdiffstats
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-14 05:30:09 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-14 05:30:09 +0000
commitaca14577e8d8624fdcde19eafacac16617b6b02e (patch)
tree48e491d0a3752df2f9332542b6e3fd795956e7c0 /gcc/tree.c
parent59420fa783ac122c63a0d4bc98c42ef0e62206a5 (diff)
downloadppe42-gcc-aca14577e8d8624fdcde19eafacac16617b6b02e.tar.gz
ppe42-gcc-aca14577e8d8624fdcde19eafacac16617b6b02e.zip
* 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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 10324030262..933bba81fd5 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1063,6 +1063,7 @@ make_node (code)
case 'd':
if (code != FUNCTION_DECL)
DECL_ALIGN (t) = 1;
+ DECL_USER_ALIGN (t) = 0;
DECL_IN_SYSTEM_HEADER (t) = in_system_header;
DECL_SOURCE_LINE (t) = lineno;
DECL_SOURCE_FILE (t) =
@@ -1076,6 +1077,7 @@ make_node (code)
case 't':
TYPE_UID (t) = next_type_uid++;
TYPE_ALIGN (t) = 1;
+ TYPE_USER_ALIGN (t) = 0;
TYPE_MAIN_VARIANT (t) = t;
TYPE_OBSTACK (t) = obstack;
TYPE_ATTRIBUTES (t) = NULL_TREE;
@@ -4649,6 +4651,7 @@ build_index_type (maxval)
TYPE_SIZE (itype) = TYPE_SIZE (sizetype);
TYPE_SIZE_UNIT (itype) = TYPE_SIZE_UNIT (sizetype);
TYPE_ALIGN (itype) = TYPE_ALIGN (sizetype);
+ TYPE_USER_ALIGN (itype) = TYPE_USER_ALIGN (sizetype);
if (host_integerp (maxval, 1))
return type_hash_canon (tree_low_cst (maxval, 1), itype);
@@ -4681,6 +4684,7 @@ build_range_type (type, lowval, highval)
TYPE_SIZE (itype) = TYPE_SIZE (type);
TYPE_SIZE_UNIT (itype) = TYPE_SIZE_UNIT (type);
TYPE_ALIGN (itype) = TYPE_ALIGN (type);
+ TYPE_USER_ALIGN (itype) = TYPE_USER_ALIGN (type);
if (host_integerp (lowval, 0) && highval != 0 && host_integerp (highval, 0))
return type_hash_canon (tree_low_cst (highval, 0)
@@ -5714,6 +5718,7 @@ build_common_tree_nodes_2 (short_double)
/* We are not going to have real types in C with less than byte alignment,
so we might as well not have any types that claim to have it. */
TYPE_ALIGN (void_type_node) = BITS_PER_UNIT;
+ TYPE_USER_ALIGN (void_type_node) = 0;
null_pointer_node = build_int_2 (0, 0);
TREE_TYPE (null_pointer_node) = build_pointer_type (void_type_node);
OpenPOWER on IntegriCloud