diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/java/class.c | 10 | ||||
-rw-r--r-- | gcc/java/typeck.c | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 9be4b74..7c20b06 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,10 @@ +2016-04-18 Michael Matz <matz@suse.de> + + * class.c (add_method_1): Use SET_DECL_ALIGN. + (make_class_data): Ditto. + (emit_register_classes_in_jcr_section): Ditto. + * typeck.c (build_java_array_type): Ditto. + 2016-01-04 Jakub Jelinek <jakub@redhat.com> Update copyright years. diff --git a/gcc/java/class.c b/gcc/java/class.c index 4f56716..3587486 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -773,7 +773,7 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type) TYPE_METHODS (this_class) = fndecl; if (!(access_flags & ACC_STATIC)) - DECL_ALIGN (fndecl) = MINIMUM_METHOD_BOUNDARY; + SET_DECL_ALIGN (fndecl, MINIMUM_METHOD_BOUNDARY); /* Notice that this is a finalizer and update the class type accordingly. This is used to optimize instance allocation. */ @@ -2207,11 +2207,11 @@ make_class_data (tree type) FINISH_RECORD_CONSTRUCTOR (cons, v2, class_type_node); DECL_INITIAL (decl) = cons; - + /* Hash synchronization requires at least 64-bit alignment. */ if (flag_hash_synchronization && POINTER_SIZE < 64) - DECL_ALIGN (decl) = 64; - + SET_DECL_ALIGN (decl, 64); + if (flag_indirect_classes) { TREE_READONLY (decl) = 1; @@ -2790,7 +2790,7 @@ emit_register_classes_in_jcr_section (void) cdecl = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifier ("_Jv_JCR_SECTION_data"), class_array_type); - DECL_ALIGN (cdecl) = POINTER_SIZE; + SET_DECL_ALIGN (cdecl, POINTER_SIZE); DECL_USER_ALIGN (cdecl) = 1; DECL_INITIAL (cdecl) = build_constructor (class_array_type, init); TREE_CONSTANT (DECL_INITIAL (cdecl)) = 1; diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index 1214eae..d2e3db6 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -305,7 +305,7 @@ build_java_array_type (tree element_type, HOST_WIDE_INT length) FIELD_DECL, get_identifier ("data"), atype); DECL_CONTEXT (arfld) = t; DECL_CHAIN (fld) = arfld; - DECL_ALIGN (arfld) = TYPE_ALIGN (element_type); + SET_DECL_ALIGN (arfld, TYPE_ALIGN (element_type)); /* We could layout_class, but that loads java.lang.Object prematurely. * This is called by the parser, and it is a bad idea to do load_class |