diff options
author | Jakub Jelinek <jakub@redhat.com> | 2000-06-14 07:30:09 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2000-06-14 07:30:09 +0200 |
commit | 11cf4d1831071d23c84e1add8a2d3fbdd360a82e (patch) | |
tree | 48e491d0a3752df2f9332542b6e3fd795956e7c0 /gcc/ch | |
parent | 51d0e20cae600863c06b07134419166632180a80 (diff) | |
download | gcc-11cf4d1831071d23c84e1add8a2d3fbdd360a82e.zip gcc-11cf4d1831071d23c84e1add8a2d3fbdd360a82e.tar.gz gcc-11cf4d1831071d23c84e1add8a2d3fbdd360a82e.tar.bz2 |
tree.h (TYPE_USER_ALIGN, [...]): Define.
* 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.
From-SVN: r34541
Diffstat (limited to 'gcc/ch')
-rw-r--r-- | gcc/ch/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ch/decl.c | 3 | ||||
-rw-r--r-- | gcc/ch/typeck.c | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index d63d1ab..59ab934 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,11 @@ +2000-06-13 Jakub Jelinek <jakub@redhat.com> + + * 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. + Tue Jun 13 15:30:46 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl> * Make-lang.in (CHILL.install-common): Use $(INSTALL_SCRIPT), not diff --git a/gcc/ch/decl.c b/gcc/ch/decl.c index 45f2656..d5fcb1d 100644 --- a/gcc/ch/decl.c +++ b/gcc/ch/decl.c @@ -3447,6 +3447,7 @@ init_decl_processing () /* 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; /* This is for wide string constants. */ wchar_type_node = short_unsigned_type_node; @@ -4596,6 +4597,7 @@ layout_enum (enumtype) DECL_SIZE (decl) = TYPE_SIZE (enumtype); DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (enumtype); DECL_ALIGN (decl) = TYPE_ALIGN (enumtype); + DECL_USER_ALIGN (decl) = TYPE_USER_ALIGN (enumtype); /* Set the TREE_VALUE to the name, rather than the decl, since that is what the rest of the compiler expects. */ @@ -4612,6 +4614,7 @@ layout_enum (enumtype) TYPE_MODE (tem) = TYPE_MODE (enumtype); TYPE_PRECISION (tem) = TYPE_PRECISION (enumtype); TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype); + TYPE_USER_ALIGN (tem) = TYPE_USER_ALIGN (enumtype); TREE_UNSIGNED (tem) = TREE_UNSIGNED (enumtype); } diff --git a/gcc/ch/typeck.c b/gcc/ch/typeck.c index 1753960..7c4f554 100644 --- a/gcc/ch/typeck.c +++ b/gcc/ch/typeck.c @@ -2725,6 +2725,7 @@ layout_chill_range_type (rangetype, must_be_const) TYPE_SIZE (rangetype) = TYPE_SIZE (type); TYPE_SIZE_UNIT (rangetype) = TYPE_SIZE_UNIT (type); TYPE_ALIGN (rangetype) = TYPE_ALIGN (type); + TYPE_USER_ALIGN (rangetype) = TYPE_USER_ALIGN (type); TREE_UNSIGNED (rangetype) = TREE_UNSIGNED (type); CH_NOVELTY (rangetype) = CH_NOVELTY (type); return rangetype; @@ -3113,7 +3114,10 @@ apply_chill_field_layout (decl, next_struct_offset) DECL_SIZE (decl) = bitsize_int (natural_length); } else - DECL_ALIGN (decl) = BITS_PER_UNIT; + { + DECL_ALIGN (decl) = BITS_PER_UNIT; + DECL_USER_ALIGN (decl) = 0; + } DECL_PACKED (decl) = 1; *next_struct_offset += natural_length; @@ -3351,6 +3355,7 @@ layout_chill_struct_type (t) TYPE_FIELDS (x) = TYPE_FIELDS (t); TYPE_LANG_SPECIFIC (x) = TYPE_LANG_SPECIFIC (t); TYPE_ALIGN (x) = TYPE_ALIGN (t); + TYPE_USER_ALIGN (x) = TYPE_USER_ALIGN (t); } resume_momentary (old_momentary); |