]> gcc.gnu.org Git - gcc.git/commitdiff
tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount.
authorMichael Matz <matz@gcc.gnu.org>
Mon, 18 Apr 2016 20:36:27 +0000 (20:36 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Mon, 18 Apr 2016 20:36:27 +0000 (20:36 +0000)
* tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount.
(SET_TYPE_ALIGN, SET_DECL_ALIGN): New.
* tree-core.h (tree_type_common.align): Use bit-field.
(tree_type_common.spare): New.
(tree_decl_common.off_align): Make smaller.
(tree_decl_common.align): Use bit-field.

* expr.c (expand_expr_addr_expr_1): Use SET_TYPE_ALIGN.
* omp-low.c (install_var_field): Use SET_DECL_ALIGN.
(scan_sharing_clauses): Ditto.
(finish_taskreg_scan): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(omp_finish_file): Ditto.
* stor-layout.c (do_type_align): Use SET_DECL_ALIGN.
(layout_decl): Ditto.
(relayout_decl): Ditto.
(finalize_record_size): Use SET_TYPE_ALIGN.
(finalize_type_size): Ditto.
(finish_builtin_struct): Ditto.
(layout_type): Ditto.
(initialize_sizetypes): Ditto.
* targhooks.c (std_gimplify_va_arg_expr): Use SET_TYPE_ALIGN.
* tree-nested.c (insert_field_into_struct): Use SET_TYPE_ALIGN.
(lookup_field_for_decl): Use SET_DECL_ALIGN.
(get_chain_field): Ditto.
(get_trampoline_type): Ditto.
(get_nl_goto_field): Ditto.
* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
SET_DECL_ALIGN.
(unpack_ts_type_common_value_fields): Use SET_TYPE_ALIGN.
* gimple-expr.c (copy_var_decl): Use SET_DECL_ALIGN.
* tree.c (make_node_stat): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(build_qualified_type): Use SET_TYPE_ALIGN.
(build_aligned_type, build_range_type_1): Ditto.
(build_atomic_base): Ditto.
(build_common_tree_nodes): Ditto.
* cfgexpand.c (align_local_variable): Use SET_DECL_ALIGN.
(expand_one_stack_var_at): Ditto.
* coverage.c (build_var): Use SET_DECL_ALIGN.
* except.c (init_eh): Ditto.
* function.c (assign_parm_setup_block): Ditto.
* symtab.c (increase_alignment_1): Ditto.
* tree-ssa-ccp.c (fold_builtin_alloca_with_align): Ditto.
* tree-vect-stmts.c (ensure_base_align): Ditto.
* varasm.c (align_variable): Ditto.
(assemble_variable): Ditto.
(build_constant_desc): Ditto.
(output_constant_def_contents): Ditto.

* config/arm/arm.c (arm_relayout_function): Use SET_DECL_ALIGN.
* config/avr/avr.c (avr_adjust_type_node): Use SET_TYPE_ALIGN.
* config/mips/mips.c (mips_std_gimplify_va_arg_expr): Ditto.
* config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Ditto.
* config/spu/spu.c (spu_build_builtin_va_list): Use SET_DECL_ALIGN.

ada/
* gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
(gnat_to_gnu_field): Ditto.
(components_to_record): Ditto.
(create_variant_part_from): Ditto.
(copy_and_substitute_in_size): Ditto.
(substitute_in_type): Ditto.
* gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
(make_packable_type): Ditto.
(maybe_pad_type): Ditto.
(finish_fat_pointer_type): Ditto.
(finish_record_type): Ditto and use SET_DECL_ALIGN.
(rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
(create_field_decl): Use SET_DECL_ALIGN.

c-family/
* c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
and SET_DECL_ALIGN.

c/
* c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.

cp/
* class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(layout_class_type): Ditto.
(build_base_field): Use SET_DECL_ALIGN.
(fixup_attribute_variants): Use SET_TYPE_ALIGN.
* decl.c (duplicate_decls): Use SET_DECL_ALIGN.
(record_unknown_type): Use SET_TYPE_ALIGN.
(cxx_init_decl_processing): Ditto.
(copy_type_enum): Ditto.
(grokfndecl): Use SET_DECL_ALIGN.
(copy_type_enum): Use SET_TYPE_ALIGN.
* pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN.
(tsubst): Ditto.
* tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN.
* lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN.
* method.c (implicitly_declare_fn): Use SET_DECL_ALIGN.
* rtti.c (emit_tinfo_decl): Ditto.

fortran/
* trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
* trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
* trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.

go/
* go-gcc.cc (Gcc_backend::implicit_variable): Use SET_DECL_ALIGN.

java/
* 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.

objc/
* objc-act.c (objc_build_struct): Use SET_DECL_ALIGN.

libcc1/
* plugin.cc (plugin_finish_record_or_union): Use SET_TYPE_ALIGN.

From-SVN: r235172

52 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/utils.c
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/cfgexpand.c
gcc/config/arm/arm.c
gcc/config/avr/avr.c
gcc/config/mips/mips.c
gcc/config/msp430/msp430.c
gcc/config/spu/spu.c
gcc/coverage.c
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/lambda.c
gcc/cp/method.c
gcc/cp/pt.c
gcc/cp/rtti.c
gcc/cp/tree.c
gcc/except.c
gcc/expr.c
gcc/fortran/ChangeLog
gcc/fortran/trans-common.c
gcc/fortran/trans-io.c
gcc/fortran/trans-types.c
gcc/function.c
gcc/gimple-expr.c
gcc/go/ChangeLog
gcc/go/go-gcc.cc
gcc/java/ChangeLog
gcc/java/class.c
gcc/java/typeck.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/omp-low.c
gcc/stor-layout.c
gcc/symtab.c
gcc/targhooks.c
gcc/tree-core.h
gcc/tree-nested.c
gcc/tree-ssa-ccp.c
gcc/tree-streamer-in.c
gcc/tree-vect-stmts.c
gcc/tree.c
gcc/tree.h
gcc/varasm.c
libcc1/ChangeLog
libcc1/plugin.cc

index 7a811a3f6e47bfafadef1156d27b09cbe0919ac4..60b327b569c8de364e82aff97b4778062ff20fd8 100644 (file)
@@ -1,3 +1,59 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount.
+       (SET_TYPE_ALIGN, SET_DECL_ALIGN): New.
+       * tree-core.h (tree_type_common.align): Use bit-field.
+       (tree_type_common.spare): New.
+       (tree_decl_common.off_align): Make smaller.
+       (tree_decl_common.align): Use bit-field.
+
+       * expr.c (expand_expr_addr_expr_1): Use SET_TYPE_ALIGN.
+       * omp-low.c (install_var_field): Use SET_DECL_ALIGN.
+       (scan_sharing_clauses): Ditto.
+       (finish_taskreg_scan): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
+       (omp_finish_file): Ditto.
+       * stor-layout.c (do_type_align): Use SET_DECL_ALIGN.
+       (layout_decl): Ditto.
+       (relayout_decl): Ditto.
+       (finalize_record_size): Use SET_TYPE_ALIGN.
+       (finalize_type_size): Ditto.
+       (finish_builtin_struct): Ditto.
+       (layout_type): Ditto.
+       (initialize_sizetypes): Ditto.
+       * targhooks.c (std_gimplify_va_arg_expr): Use SET_TYPE_ALIGN.
+       * tree-nested.c (insert_field_into_struct): Use SET_TYPE_ALIGN.
+       (lookup_field_for_decl): Use SET_DECL_ALIGN.
+       (get_chain_field): Ditto.
+       (get_trampoline_type): Ditto.
+       (get_nl_goto_field): Ditto.
+       * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
+       SET_DECL_ALIGN.
+       (unpack_ts_type_common_value_fields): Use SET_TYPE_ALIGN.
+       * gimple-expr.c (copy_var_decl): Use SET_DECL_ALIGN.
+       * tree.c (make_node_stat): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
+       (build_qualified_type): Use SET_TYPE_ALIGN.
+       (build_aligned_type, build_range_type_1): Ditto.
+       (build_atomic_base): Ditto.
+       (build_common_tree_nodes): Ditto.
+       * cfgexpand.c (align_local_variable): Use SET_DECL_ALIGN.
+       (expand_one_stack_var_at): Ditto.
+       * coverage.c (build_var): Use SET_DECL_ALIGN.
+       * except.c (init_eh): Ditto.
+       * function.c (assign_parm_setup_block): Ditto.
+       * symtab.c (increase_alignment_1): Ditto.
+       * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Ditto.
+       * tree-vect-stmts.c (ensure_base_align): Ditto.
+       * varasm.c (align_variable): Ditto.
+       (assemble_variable): Ditto.
+       (build_constant_desc): Ditto.
+       (output_constant_def_contents): Ditto.
+
+       * config/arm/arm.c (arm_relayout_function): Use SET_DECL_ALIGN.
+       * config/avr/avr.c (avr_adjust_type_node): Use SET_TYPE_ALIGN.
+       * config/mips/mips.c (mips_std_gimplify_va_arg_expr): Ditto.
+       * config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Ditto.
+       * config/spu/spu.c (spu_build_builtin_va_list): Use SET_DECL_ALIGN.
+
 2016-04-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/70708
index cc95c820b1342864a227e68859f14c0c9caaa776..1ad6083afe6aec15fcf9ad31e5b0c6e787a52403 100644 (file)
@@ -1,3 +1,19 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
+       (gnat_to_gnu_field): Ditto.
+       (components_to_record): Ditto.
+       (create_variant_part_from): Ditto.
+       (copy_and_substitute_in_size): Ditto.
+       (substitute_in_type): Ditto.
+       * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
+       (make_packable_type): Ditto.
+       (maybe_pad_type): Ditto.
+       (finish_fat_pointer_type): Ditto.
+       (finish_record_type): Ditto and use SET_DECL_ALIGN.
+       (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
+       (create_field_decl): Use SET_DECL_ALIGN.
+
 2016-04-18  Arnaud Charlet  <charlet@adacore.com>
 
        * einfo.adb (Overridden_Operation): assert that
index c1f409de0118d9bd50ccafedd06b961ff66268b6..8ea72b5f7faa42f0c02ed915c6515d5d3094d475 100644 (file)
@@ -1888,8 +1888,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
             This means that bit-packed arrays are given "ceil" alignment for
             their size by default, which may seem counter-intuitive but makes
             it possible to overlay them on modular types easily.  */
-         TYPE_ALIGN (gnu_type)
-           = align > 0 ? align : TYPE_ALIGN (gnu_field_type);
+         SET_TYPE_ALIGN (gnu_type,
+                         align > 0 ? align : TYPE_ALIGN (gnu_field_type));
 
          /* Propagate the reverse storage order flag to the record type so
             that the required byte swapping is performed when retrieving the
@@ -1953,7 +1953,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
          TYPE_SIZE (gnu_type) = TYPE_SIZE (gnu_field_type);
          TYPE_SIZE_UNIT (gnu_type) = TYPE_SIZE_UNIT (gnu_field_type);
          SET_TYPE_ADA_SIZE (gnu_type, TYPE_RM_SIZE (gnu_field_type));
-         TYPE_ALIGN (gnu_type) = align;
+         SET_TYPE_ALIGN (gnu_type, align);
          relate_alias_sets (gnu_type, gnu_field_type, ALIAS_SET_COPY);
 
          /* Don't declare the field as addressable since we won't be taking
@@ -2265,9 +2265,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
        if (No (Packed_Array_Impl_Type (gnat_entity))
            && Known_Alignment (gnat_entity))
          {
-           TYPE_ALIGN (tem)
-             = validate_alignment (Alignment (gnat_entity), gnat_entity,
-                                   TYPE_ALIGN (tem));
+           SET_TYPE_ALIGN (tem,
+                           validate_alignment (Alignment (gnat_entity),
+                                               gnat_entity,
+                                               TYPE_ALIGN (tem)));
            if (Present (Alignment_Clause (gnat_entity)))
              TYPE_USER_ALIGN (tem) = 1;
          }
@@ -2296,7 +2297,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
        TYPE_POINTER_TO (gnu_type) = gnu_fat_type;
        TYPE_REFERENCE_TO (gnu_type) = gnu_fat_type;
        SET_TYPE_MODE (gnu_type, BLKmode);
-       TYPE_ALIGN (gnu_type) = TYPE_ALIGN (tem);
+       SET_TYPE_ALIGN (gnu_type, TYPE_ALIGN (tem));
 
        /* If the maximum size doesn't overflow, use it.  */
        if (gnu_max_size
@@ -3035,11 +3036,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
        /* Always set the alignment on the record type here so that it can
           get the proper layout.  */
        if (has_align)
-         TYPE_ALIGN (gnu_type)
-           = validate_alignment (Alignment (gnat_entity), gnat_entity, 0);
+         SET_TYPE_ALIGN (gnu_type,
+                         validate_alignment (Alignment (gnat_entity),
+                                             gnat_entity, 0));
        else
          {
-           TYPE_ALIGN (gnu_type) = 0;
+           SET_TYPE_ALIGN (gnu_type, 0);
 
            /* If a type needs strict alignment, the minimum size will be the
               type size instead of the RM size (see validate_size).  Cap the
@@ -3138,7 +3140,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
               be created with a component clause below, then we need
               to apply the same adjustment as in gnat_to_gnu_field.  */
            if (has_rep && TYPE_ALIGN (gnu_type) < TYPE_ALIGN (gnu_parent))
-             TYPE_ALIGN (gnu_type) = TYPE_ALIGN (gnu_parent);
+             SET_TYPE_ALIGN (gnu_type, TYPE_ALIGN (gnu_parent));
 
            /* Finally we fix up both kinds of twisted COMPONENT_REF we have
               initially built.  The discriminants must reference the fields
@@ -4565,8 +4567,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
                    /* Set a default alignment to speed up accesses.  But we
                       shouldn't increase the size of the structure too much,
                       lest it doesn't fit in return registers anymore.  */
-                   TYPE_ALIGN (gnu_return_type)
-                     = get_mode_alignment (ptr_mode);
+                   SET_TYPE_ALIGN (gnu_return_type,
+                                   get_mode_alignment (ptr_mode));
                  }
 
                gnu_field
@@ -4613,8 +4615,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
                    if (mode != BLKmode)
                      {
                        SET_TYPE_MODE (gnu_return_type, mode);
-                       TYPE_ALIGN (gnu_return_type)
-                         = GET_MODE_ALIGNMENT (mode);
+                       SET_TYPE_ALIGN (gnu_return_type,
+                                       GET_MODE_ALIGNMENT (mode));
                        TYPE_SIZE (gnu_return_type)
                          = bitsize_int (GET_MODE_BITSIZE (mode));
                        TYPE_SIZE_UNIT (gnu_return_type)
@@ -6796,7 +6798,7 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed,
          const unsigned int type_align = TYPE_ALIGN (gnu_field_type);
 
          if (TYPE_ALIGN (gnu_record_type) < type_align)
-           TYPE_ALIGN (gnu_record_type) = type_align;
+           SET_TYPE_ALIGN (gnu_record_type, type_align);
 
          /* If the position is not a multiple of the alignment of the type,
             then error out and reset the position.  */
@@ -7283,7 +7285,7 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list,
            = make_node (unchecked_union ? UNION_TYPE : QUAL_UNION_TYPE);
 
          TYPE_NAME (gnu_union_type) = gnu_union_name;
-         TYPE_ALIGN (gnu_union_type) = 0;
+         SET_TYPE_ALIGN (gnu_union_type, 0);
          TYPE_PACKED (gnu_union_type) = TYPE_PACKED (gnu_record_type);
          TYPE_REVERSE_STORAGE_ORDER (gnu_union_type)
            = TYPE_REVERSE_STORAGE_ORDER (gnu_record_type);
@@ -7336,7 +7338,7 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list,
          /* Set the alignment of the inner type in case we need to make
             inner objects into bitfields, but then clear it out so the
             record actually gets only the alignment required.  */
-         TYPE_ALIGN (gnu_variant_type) = TYPE_ALIGN (gnu_record_type);
+         SET_TYPE_ALIGN (gnu_variant_type, TYPE_ALIGN (gnu_record_type));
          TYPE_PACKED (gnu_variant_type) = TYPE_PACKED (gnu_record_type);
          TYPE_REVERSE_STORAGE_ORDER (gnu_variant_type)
            = TYPE_REVERSE_STORAGE_ORDER (gnu_record_type);
@@ -7568,9 +7570,9 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list,
          SET_DECL_OFFSET_ALIGN (gnu_field, BIGGEST_ALIGNMENT);
          DECL_FIELD_BIT_OFFSET (gnu_field) = bitsize_zero_node;
          if (field_is_aliased (gnu_field))
-           TYPE_ALIGN (gnu_record_type)
-             = MAX (TYPE_ALIGN (gnu_record_type),
-                    TYPE_ALIGN (TREE_TYPE (gnu_field)));
+           SET_TYPE_ALIGN (gnu_record_type,
+                           MAX (TYPE_ALIGN (gnu_record_type),
+                                TYPE_ALIGN (TREE_TYPE (gnu_field))));
          MOVE_FROM_FIELD_LIST_TO (gnu_zero_list);
          continue;
        }
@@ -7681,7 +7683,7 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list,
     gnu_field_list = chainon (gnu_field_list, gnu_variant_part);
 
   if (cancel_alignment)
-    TYPE_ALIGN (gnu_record_type) = 0;
+    SET_TYPE_ALIGN (gnu_record_type, 0);
 
   TYPE_ARTIFICIAL (gnu_record_type) = artificial;
 
@@ -8794,7 +8796,7 @@ create_variant_part_from (tree old_variant_part,
       SET_TYPE_ADA_SIZE (new_union_type,
                         size_binop (MINUS_EXPR, TYPE_ADA_SIZE (record_type),
                                     first_bit));
-      TYPE_ALIGN (new_union_type) = TYPE_ALIGN (old_union_type);
+      SET_TYPE_ALIGN (new_union_type, TYPE_ALIGN (old_union_type));
       relate_alias_sets (new_union_type, old_union_type, ALIAS_SET_COPY);
     }
   else
@@ -8891,7 +8893,7 @@ copy_and_substitute_in_size (tree new_type, tree old_type,
   TYPE_SIZE (new_type) = TYPE_SIZE (old_type);
   TYPE_SIZE_UNIT (new_type) = TYPE_SIZE_UNIT (old_type);
   SET_TYPE_ADA_SIZE (new_type, TYPE_ADA_SIZE (old_type));
-  TYPE_ALIGN (new_type) = TYPE_ALIGN (old_type);
+  SET_TYPE_ALIGN (new_type, TYPE_ALIGN (old_type));
   relate_alias_sets (new_type, old_type, ALIAS_SET_COPY);
 
   if (CONTAINS_PLACEHOLDER_P (TYPE_SIZE (new_type)))
@@ -9034,7 +9036,7 @@ substitute_in_type (tree t, tree f, tree r)
          return t;
 
        nt = build_nonshared_array_type (component, domain);
-       TYPE_ALIGN (nt) = TYPE_ALIGN (t);
+       SET_TYPE_ALIGN (nt, TYPE_ALIGN (t));
        TYPE_USER_ALIGN (nt) = TYPE_USER_ALIGN (t);
        SET_TYPE_MODE (nt, TYPE_MODE (t));
        TYPE_SIZE (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
index 9bd2773ba9e8b50abc40aabb1a25a1f00637ac45..d568dff8e019034f1161349dc06bfe8261c33cd4 100644 (file)
@@ -904,7 +904,7 @@ make_aligning_type (tree type, unsigned int align, tree size,
                             pos, 1, -1);
   TYPE_FIELDS (record_type) = field;
 
-  TYPE_ALIGN (record_type) = base_align;
+  SET_TYPE_ALIGN (record_type, base_align);
   TYPE_USER_ALIGN (record_type) = 1;
 
   TYPE_SIZE (record_type)
@@ -963,7 +963,7 @@ make_packable_type (tree type, bool in_record)
   if (in_record && size <= MAX_FIXED_MODE_SIZE)
     {
       align = ceil_pow2 (size);
-      TYPE_ALIGN (new_type) = align;
+      SET_TYPE_ALIGN (new_type, align);
       new_size = (size + align - 1) & -align;
     }
   else
@@ -983,7 +983,7 @@ make_packable_type (tree type, bool in_record)
        return type;
 
       align = new_size & -new_size;
-      TYPE_ALIGN (new_type) = MIN (TYPE_ALIGN (type), align);
+      SET_TYPE_ALIGN (new_type, MIN (TYPE_ALIGN (type), align));
     }
 
   TYPE_USER_ALIGN (new_type) = 1;
@@ -1295,7 +1295,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
   else if (Present (gnat_entity))
     TYPE_NAME (record) = create_concat_name (gnat_entity, "PAD");
 
-  TYPE_ALIGN (record) = align ? align : orig_align;
+  SET_TYPE_ALIGN (record, align ? align : orig_align);
   TYPE_SIZE (record) = size ? size : orig_size;
   TYPE_SIZE_UNIT (record)
     = convert (sizetype,
@@ -1650,7 +1650,7 @@ finish_fat_pointer_type (tree record_type, tree field_list)
 {
   /* Make sure we can put it into a register.  */
   if (STRICT_ALIGNMENT)
-    TYPE_ALIGN (record_type) = MIN (BIGGEST_ALIGNMENT, 2 * POINTER_SIZE);
+    SET_TYPE_ALIGN (record_type, MIN (BIGGEST_ALIGNMENT, 2 * POINTER_SIZE));
 
   /* Show what it really is.  */
   TYPE_FAT_POINTER_P (record_type) = 1;
@@ -1697,7 +1697,8 @@ finish_record_type (tree record_type, tree field_list, int rep_level,
      that just means some initializations; otherwise, layout the record.  */
   if (rep_level > 0)
     {
-      TYPE_ALIGN (record_type) = MAX (BITS_PER_UNIT, TYPE_ALIGN (record_type));
+      SET_TYPE_ALIGN (record_type, MAX (BITS_PER_UNIT,
+                                       TYPE_ALIGN (record_type)));
 
       if (!had_size_unit)
        TYPE_SIZE_UNIT (record_type) = size_zero_node;
@@ -1775,7 +1776,7 @@ finish_record_type (tree record_type, tree field_list, int rep_level,
                 maximum alignment, if any.  */
              if (TYPE_ALIGN (record_type) >= align)
                {
-                 DECL_ALIGN (field) = MAX (DECL_ALIGN (field), align);
+                 SET_DECL_ALIGN (field, MAX (DECL_ALIGN (field), align));
                  DECL_BIT_FIELD (field) = 0;
                }
              else if (!had_align
@@ -1784,8 +1785,8 @@ finish_record_type (tree record_type, tree field_list, int rep_level,
                       && (!TYPE_MAX_ALIGN (record_type)
                           || TYPE_MAX_ALIGN (record_type) >= align))
                {
-                 TYPE_ALIGN (record_type) = align;
-                 DECL_ALIGN (field) = MAX (DECL_ALIGN (field), align);
+                 SET_TYPE_ALIGN (record_type, align);
+                 SET_DECL_ALIGN (field, MAX (DECL_ALIGN (field), align));
                  DECL_BIT_FIELD (field) = 0;
                }
            }
@@ -1808,8 +1809,8 @@ finish_record_type (tree record_type, tree field_list, int rep_level,
       /* A type must be as aligned as its most aligned field that is not
         a bit-field.  But this is already enforced by layout_type.  */
       if (rep_level > 0 && !DECL_BIT_FIELD (field))
-       TYPE_ALIGN (record_type)
-         = MAX (TYPE_ALIGN (record_type), DECL_ALIGN (field));
+       SET_TYPE_ALIGN (record_type,
+                       MAX (TYPE_ALIGN (record_type), DECL_ALIGN (field)));
 
       switch (code)
        {
@@ -1980,7 +1981,7 @@ rest_of_record_type_compilation (tree record_type)
        = concat_name (orig_name, TREE_CODE (record_type) == QUAL_UNION_TYPE
                                  ? "XVU" : "XVE");
       TYPE_NAME (new_record_type) = new_name;
-      TYPE_ALIGN (new_record_type) = BIGGEST_ALIGNMENT;
+      SET_TYPE_ALIGN (new_record_type, BIGGEST_ALIGNMENT);
       TYPE_STUB_DECL (new_record_type)
        = create_type_stub_decl (new_name, new_record_type);
       DECL_IGNORED_P (TYPE_STUB_DECL (new_record_type))
@@ -2072,7 +2073,7 @@ rest_of_record_type_compilation (tree record_type)
              if (align != 0 && TYPE_ALIGN (field_type) > align)
                {
                  field_type = copy_node (field_type);
-                 TYPE_ALIGN (field_type) = align;
+                 SET_TYPE_ALIGN (field_type, align);
                }
              var = true;
            }
@@ -2620,7 +2621,7 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos,
                 || (!pos
                     && AGGREGATE_TYPE_P (type)
                     && aggregate_type_contains_array_p (type))))
-    DECL_ALIGN (field_decl) = BITS_PER_UNIT;
+    SET_DECL_ALIGN (field_decl, BITS_PER_UNIT);
 
   /* If a size is specified, use it.  Otherwise, if the record type is packed
      compute a size to use, which may differ from the object's natural size.
@@ -2667,9 +2668,9 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos,
        {
          if (TYPE_ALIGN (record_type) != 0
              && TYPE_ALIGN (record_type) < TYPE_ALIGN (type))
-           DECL_ALIGN (field_decl) = TYPE_ALIGN (record_type);
+           SET_DECL_ALIGN (field_decl, TYPE_ALIGN (record_type));
          else
-           DECL_ALIGN (field_decl) = TYPE_ALIGN (type);
+           SET_DECL_ALIGN (field_decl, TYPE_ALIGN (type));
        }
     }
 
@@ -2685,10 +2686,10 @@ create_field_decl (tree name, tree type, tree record_type, tree size, tree pos,
         : packed && TYPE_MODE (type) != BLKmode ? BITS_PER_UNIT : 0);
 
     if (bit_align > DECL_ALIGN (field_decl))
-      DECL_ALIGN (field_decl) = bit_align;
+      SET_DECL_ALIGN (field_decl, bit_align);
     else if (!bit_align && TYPE_ALIGN (type) > DECL_ALIGN (field_decl))
       {
-       DECL_ALIGN (field_decl) = TYPE_ALIGN (type);
+       SET_DECL_ALIGN (field_decl, TYPE_ALIGN (type));
        DECL_USER_ALIGN (field_decl) = TYPE_USER_ALIGN (type);
       }
   }
index 5cf0e84a741e789fccf36972ace0f2fe4293d98e..7ae6903eb7e4aea5fa9266a6278570809b91340c 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
+       and SET_DECL_ALIGN.
+
 2016-04-17  Eric Botcazou  <ebotcazou@adacore.com>
 
        * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
index f2846bb26e7ce77d6a80e25ca7ae670c7e6eddaa..cae2faf5c4f28060ecd0818c93f3babf9ed8878c 100644 (file)
@@ -7837,7 +7837,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
       else
        *type = build_variant_type_copy (*type);
 
-      TYPE_ALIGN (*type) = (1U << i) * BITS_PER_UNIT;
+      SET_TYPE_ALIGN (*type, (1U << i) * BITS_PER_UNIT);
       TYPE_USER_ALIGN (*type) = 1;
     }
   else if (! VAR_OR_FUNCTION_DECL_P (decl)
@@ -7871,7 +7871,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
     }
   else
     {
-      DECL_ALIGN (decl) = (1U << i) * BITS_PER_UNIT;
+      SET_DECL_ALIGN (decl, (1U << i) * BITS_PER_UNIT);
       DECL_USER_ALIGN (decl) = 1;
     }
 
index 7257f79e0b2507abdcab7f17a1a7ede5cf0d2669..b46df1f0a495e4a12be894539bff9044471327e8 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
+       (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
+
 2016-04-15  Marek Polacek  <polacek@redhat.com>
 
        PR c/70671
index 0dd2121b86832155a404d7fa57044d8ed6b0fd4f..f0c677b1cef1d3f284847323ae50f5afbb290175 100644 (file)
@@ -2369,7 +2369,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
       if (TYPE_USER_ALIGN (tem))
        {
          if (TYPE_ALIGN (tem) > TYPE_ALIGN (newtype))
-           TYPE_ALIGN (newtype) = TYPE_ALIGN (tem);
+           SET_TYPE_ALIGN (newtype, TYPE_ALIGN (tem));
          TYPE_USER_ALIGN (newtype) = true;
        }
 
@@ -2410,7 +2410,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
       DECL_MODE (newdecl) = DECL_MODE (olddecl);
       if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl))
        {
-         DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl);
+         SET_DECL_ALIGN (newdecl, DECL_ALIGN (olddecl));
          DECL_USER_ALIGN (newdecl) |= DECL_USER_ALIGN (olddecl);
        }
     }
@@ -6763,7 +6763,7 @@ grokdeclarator (const struct c_declarator *declarator,
     /* Apply _Alignas specifiers.  */
     if (alignas_align)
       {
-       DECL_ALIGN (decl) = alignas_align * BITS_PER_UNIT;
+       SET_DECL_ALIGN (decl, alignas_align * BITS_PER_UNIT);
        DECL_USER_ALIGN (decl) = 1;
       }
 
@@ -7205,7 +7205,7 @@ parser_xref_tag (location_t loc, enum tree_code code, tree name)
       /* Give the type a default layout like unsigned int
         to avoid crashing if it does not get defined.  */
       SET_TYPE_MODE (ref, TYPE_MODE (unsigned_type_node));
-      TYPE_ALIGN (ref) = TYPE_ALIGN (unsigned_type_node);
+      SET_TYPE_ALIGN (ref, TYPE_ALIGN (unsigned_type_node));
       TYPE_USER_ALIGN (ref) = 0;
       TYPE_UNSIGNED (ref) = 1;
       TYPE_PRECISION (ref) = TYPE_PRECISION (unsigned_type_node);
@@ -8101,7 +8101,7 @@ finish_enum (tree enumtype, tree values, tree attributes)
   TYPE_MIN_VALUE (enumtype) = TYPE_MIN_VALUE (tem);
   TYPE_MAX_VALUE (enumtype) = TYPE_MAX_VALUE (tem);
   TYPE_UNSIGNED (enumtype) = TYPE_UNSIGNED (tem);
-  TYPE_ALIGN (enumtype) = TYPE_ALIGN (tem);
+  SET_TYPE_ALIGN (enumtype, TYPE_ALIGN (tem));
   TYPE_SIZE (enumtype) = 0;
   TYPE_PRECISION (enumtype) = TYPE_PRECISION (tem);
 
@@ -8163,7 +8163,7 @@ finish_enum (tree enumtype, tree values, tree attributes)
       TYPE_SIZE_UNIT (tem) = TYPE_SIZE_UNIT (enumtype);
       SET_TYPE_MODE (tem, TYPE_MODE (enumtype));
       TYPE_PRECISION (tem) = TYPE_PRECISION (enumtype);
-      TYPE_ALIGN (tem) = TYPE_ALIGN (enumtype);
+      SET_TYPE_ALIGN (tem, TYPE_ALIGN (enumtype));
       TYPE_USER_ALIGN (tem) = TYPE_USER_ALIGN (enumtype);
       TYPE_UNSIGNED (tem) = TYPE_UNSIGNED (enumtype);
       TYPE_LANG_SPECIFIC (tem) = TYPE_LANG_SPECIFIC (enumtype);
index 1341c14ce2b6b1cbfe5619bd54449bde43e1084d..3ed2270e881792bc4e16e1bb91e960f7ff1e4e9e 100644 (file)
@@ -369,7 +369,7 @@ align_local_variable (tree decl)
   else
     {
       align = LOCAL_DECL_ALIGNMENT (decl);
-      DECL_ALIGN (decl) = align;
+      SET_DECL_ALIGN (decl, align);
     }
   return align / BITS_PER_UNIT;
 }
@@ -1018,7 +1018,7 @@ expand_one_stack_var_at (tree decl, rtx base, unsigned base_align,
         alignment here, but (at least) the i386 port does exactly this
         via the MINIMUM_ALIGNMENT hook.  */
 
-      DECL_ALIGN (decl) = align;
+      SET_DECL_ALIGN (decl, align);
       DECL_USER_ALIGN (decl) = 0;
     }
 
index 5974c65d314c973d49a000ef458d6f765596f001..4d9f6f1ad7efaedcecfff2361167ec842d18dff0 100644 (file)
@@ -29981,8 +29981,8 @@ arm_relayout_function (tree fndecl)
   if (!callee_tree)
     callee_tree = target_option_default_node;
 
-  DECL_ALIGN (fndecl) =
-    FUNCTION_BOUNDARY_P (TREE_TARGET_OPTION (callee_tree)->x_target_flags);
+  struct cl_target_option *opts = TREE_TARGET_OPTION (callee_tree);
+  SET_DECL_ALIGN (fndecl, FUNCTION_BOUNDARY_P (opts->x_target_flags));
 }
 
 /* Inner function to process the attribute((target(...))), take an argument and
index a7728e3b10cf0a9545da42e56856d4d6d3aaa84a..8de39e0a660668fccd7bc1257ce4d7fb55f35ede 100644 (file)
@@ -911,7 +911,7 @@ avr_adjust_type_node (tree *node, machine_mode mode, int sat_p)
   TYPE_IBIT (*node) = GET_MODE_IBIT (mode);
   TYPE_FBIT (*node) = GET_MODE_FBIT (mode);
   TYPE_PRECISION (*node) = GET_MODE_BITSIZE (mode);
-  TYPE_ALIGN (*node) = 8;
+  SET_TYPE_ALIGN (*node, 8);
   SET_TYPE_MODE (*node, mode);
 
   layout_type (*node);
index 5af3d1e6505d23c856cde896d475f280993e9276..399f231791de66ecb881e56acda315a9cf9aaa95 100644 (file)
@@ -6304,7 +6304,7 @@ mips_std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
   if (boundary < TYPE_ALIGN (type))
     {
       type = build_variant_type_copy (type);
-      TYPE_ALIGN (type) = boundary;
+      SET_TYPE_ALIGN (type, boundary);
     }
 
   /* Compute the rounded size of the type.  */
index 6f6311672aa61d09e7aefc4bb179641ded16449f..2e2a02c0d1a534e1447010e2db1aec40bc19c47a 100644 (file)
@@ -1461,7 +1461,7 @@ msp430_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
   if (boundary < TYPE_ALIGN (type))
     {
       type = build_variant_type_copy (type);
-      TYPE_ALIGN (type) = boundary;
+      SET_TYPE_ALIGN (type, boundary);
     }
 
   /* Compute the rounded size of the type.  */
index 401c295b138166a342c2bdbafb42e60cac45a59c..c3757eb029e638e804fc5a937f26f6a2e5c7d4e6 100644 (file)
@@ -3915,11 +3915,11 @@ spu_build_builtin_va_list (void)
                       FIELD_DECL, get_identifier ("__skip"), ptr_type_node);
 
   DECL_FIELD_CONTEXT (f_args) = record;
-  DECL_ALIGN (f_args) = 128;
+  SET_DECL_ALIGN (f_args, 128);
   DECL_USER_ALIGN (f_args) = 1;
 
   DECL_FIELD_CONTEXT (f_skip) = record;
-  DECL_ALIGN (f_skip) = 128;
+  SET_DECL_ALIGN (f_skip, 128);
   DECL_USER_ALIGN (f_skip) = 1;
 
   TYPE_STUB_DECL (record) = type_decl;
index b1fce7d0e7a462ef94c8973aab2bc43f5113bd0d..67cc908cbf580cdf093ac0bf6d57e24d66439eb9 100644 (file)
@@ -751,7 +751,7 @@ build_var (tree fn_decl, tree type, int counter)
   TREE_STATIC (var) = 1;
   TREE_ADDRESSABLE (var) = 1;
   DECL_NONALIASED (var) = 1;
-  DECL_ALIGN (var) = TYPE_ALIGN (type);
+  SET_DECL_ALIGN (var, TYPE_ALIGN (type));
 
   return var;
 }
index 104da7b58d2fda22f9d84ece4cd5fa6da3eab5ea..c50c6abd6160b7e4b2dc46c0dbf2e6b122780f45 100644 (file)
@@ -1,3 +1,22 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
+       (layout_class_type): Ditto.
+       (build_base_field): Use SET_DECL_ALIGN.
+       (fixup_attribute_variants): Use SET_TYPE_ALIGN.
+       * decl.c (duplicate_decls): Use SET_DECL_ALIGN.
+       (record_unknown_type): Use SET_TYPE_ALIGN.
+       (cxx_init_decl_processing): Ditto.
+       (copy_type_enum): Ditto.
+       (grokfndecl): Use SET_DECL_ALIGN.
+       (copy_type_enum): Use SET_TYPE_ALIGN.
+       * pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN.
+       (tsubst): Ditto.
+       * tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN.
+       * lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN.
+       * method.c (implicitly_declare_fn): Use SET_DECL_ALIGN.
+       * rtti.c (emit_tinfo_decl): Ditto.
+
 2016-04-18  Jason Merrill  <jason@redhat.com>
 
        PR c++/70690
index 2c5ce7384dac3ce14a64dc07753c10348a8441fe..2705e189afa17997ad8d6691c87dde3b2e1eb4d2 100644 (file)
@@ -801,7 +801,7 @@ build_vtable (tree class_type, tree name, tree vtable_type)
   TREE_STATIC (decl) = 1;
   TREE_READONLY (decl) = 1;
   DECL_VIRTUAL_P (decl) = 1;
-  DECL_ALIGN (decl) = TARGET_VTABLE_ENTRY_ALIGN;
+  SET_DECL_ALIGN (decl, TARGET_VTABLE_ENTRY_ALIGN);
   DECL_USER_ALIGN (decl) = true;
   DECL_VTABLE_OR_VTT_P (decl) = 1;
   set_linkage_according_to_type (class_type, decl);
@@ -2035,7 +2035,7 @@ fixup_attribute_variants (tree t)
        valign = MAX (valign, TYPE_ALIGN (variants));
       else
        TYPE_USER_ALIGN (variants) = user_align;
-      TYPE_ALIGN (variants) = valign;
+      SET_TYPE_ALIGN (variants, valign);
       if (may_alias)
        fixup_may_alias (variants);
     }
@@ -4484,7 +4484,7 @@ build_base_field (record_layout_info rli, tree binfo,
        {
          DECL_SIZE (decl) = CLASSTYPE_SIZE (basetype);
          DECL_SIZE_UNIT (decl) = CLASSTYPE_SIZE_UNIT (basetype);
-         DECL_ALIGN (decl) = CLASSTYPE_ALIGN (basetype);
+         SET_DECL_ALIGN (decl, CLASSTYPE_ALIGN (basetype));
          DECL_USER_ALIGN (decl) = CLASSTYPE_USER_ALIGN (basetype);
          DECL_MODE (decl) = TYPE_MODE (basetype);
          DECL_FIELD_IS_BASE (decl) = 1;
@@ -6404,7 +6404,7 @@ layout_class_type (tree t, tree *virtuals_p)
            }
 
          DECL_SIZE (field) = TYPE_SIZE (integer_type);
-         DECL_ALIGN (field) = TYPE_ALIGN (integer_type);
+         SET_DECL_ALIGN (field, TYPE_ALIGN (integer_type));
          DECL_USER_ALIGN (field) = TYPE_USER_ALIGN (integer_type);
          layout_nonempty_base_or_field (rli, field, NULL_TREE,
                                         empty_base_offsets);
@@ -6539,7 +6539,7 @@ layout_class_type (tree t, tree *virtuals_p)
                      size_binop (MULT_EXPR,
                                  fold_convert (bitsizetype, eoc),
                                  bitsize_int (BITS_PER_UNIT)));
-      TYPE_ALIGN (base_t) = rli->record_align;
+      SET_TYPE_ALIGN (base_t, rli->record_align);
       TYPE_USER_ALIGN (base_t) = TYPE_USER_ALIGN (t);
 
       /* Copy the fields from T.  */
index 38e6bd83a2a5cb1ea312e23b29b7ef7e1f2b5b08..461822ba16774d0729a0ebfc7df34ae764f40a78 100644 (file)
@@ -2066,7 +2066,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
          if (TYPE_USER_ALIGN (tem))
            {
              if (TYPE_ALIGN (tem) > TYPE_ALIGN (newtype))
-               TYPE_ALIGN (newtype) = TYPE_ALIGN (tem);
+               SET_TYPE_ALIGN (newtype, TYPE_ALIGN (tem));
              TYPE_USER_ALIGN (newtype) = true;
            }
 
@@ -2490,7 +2490,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
   /* Likewise for DECL_ALIGN, DECL_USER_ALIGN and DECL_PACKED.  */
   if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl))
     {
-      DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl);
+      SET_DECL_ALIGN (newdecl, DECL_ALIGN (olddecl));
       DECL_USER_ALIGN (newdecl) |= DECL_USER_ALIGN (olddecl);
     }
   DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl);
@@ -3919,7 +3919,7 @@ record_unknown_type (tree type, const char* name)
   DECL_IGNORED_P (decl) = 1;
   TYPE_DECL_SUPPRESS_DEBUG (decl) = 1;
   TYPE_SIZE (type) = TYPE_SIZE (void_type_node);
-  TYPE_ALIGN (type) = 1;
+  SET_TYPE_ALIGN (type, 1);
   TYPE_USER_ALIGN (type) = 0;
   SET_TYPE_MODE (type, TYPE_MODE (void_type_node));
 }
@@ -4174,7 +4174,7 @@ cxx_init_decl_processing (void)
     TYPE_UNSIGNED (nullptr_type_node) = 1;
     TYPE_PRECISION (nullptr_type_node) = GET_MODE_BITSIZE (ptr_mode);
     if (abi_version_at_least (9))
-      TYPE_ALIGN (nullptr_type_node) = GET_MODE_ALIGNMENT (ptr_mode);
+      SET_TYPE_ALIGN (nullptr_type_node, GET_MODE_ALIGNMENT (ptr_mode));
     SET_TYPE_MODE (nullptr_type_node, ptr_mode);
     record_builtin_type (RID_MAX, "decltype(nullptr)", nullptr_type_node);
     nullptr_node = build_int_cst (nullptr_type_node, 0);
@@ -7924,7 +7924,7 @@ grokfndecl (tree ctype,
       parms = parm;
 
       /* Allocate space to hold the vptr bit if needed.  */
-      DECL_ALIGN (decl) = MINIMUM_METHOD_BOUNDARY;
+      SET_DECL_ALIGN (decl, MINIMUM_METHOD_BOUNDARY);
     }
   DECL_ARGUMENTS (decl) = parms;
   for (t = parms; t; t = DECL_CHAIN (t))
@@ -13115,7 +13115,7 @@ copy_type_enum (tree dst, tree src)
        valign = MAX (valign, TYPE_ALIGN (t));
       else
        TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (src);
-      TYPE_ALIGN (t) = valign;
+      SET_TYPE_ALIGN (t, valign);
       TYPE_UNSIGNED (t) = TYPE_UNSIGNED (src);
     }
 }
index cdc11febcffa4038ddaccd37b53c2880cd8a2c58..374a78b1b4f1087097b463c7e27d9c862b7366d6 100644 (file)
@@ -1006,7 +1006,7 @@ maybe_add_lambda_conv_op (tree type)
   tree convfn = build_lang_decl (FUNCTION_DECL, name, fntype);
   tree fn = convfn;
   DECL_SOURCE_LOCATION (fn) = DECL_SOURCE_LOCATION (callop);
-  DECL_ALIGN (fn) = MINIMUM_METHOD_BOUNDARY;
+  SET_DECL_ALIGN (fn, MINIMUM_METHOD_BOUNDARY);
   SET_OVERLOADED_OPERATOR_CODE (fn, TYPE_EXPR);
   grokclassfn (type, fn, NO_SPECIAL);
   set_linkage_according_to_type (type, fn);
index 38f2a5427cc78d783e1aad1d81962918982ac511..862451f249bf1daf625751c30af2625c7e08d5d9 100644 (file)
@@ -1865,7 +1865,7 @@ implicitly_declare_fn (special_function_kind kind, tree type,
       SET_OVERLOADED_OPERATOR_CODE (fn, NOP_EXPR);
     }
 
-  DECL_ALIGN (fn) = MINIMUM_METHOD_BOUNDARY;
+  SET_DECL_ALIGN (fn, MINIMUM_METHOD_BOUNDARY);
 
   /* Create the explicit arguments.  */
   if (rhs_parm_type)
index 325351fbee5e61aa83ab46019820a0804fff630b..a6d56d147bb424f0fcc41c969ef7661160964e69 100644 (file)
@@ -9856,7 +9856,7 @@ instantiate_class_template_1 (tree type)
     DECL_SOURCE_LOCATION (typedecl);
 
   TYPE_PACKED (type) = TYPE_PACKED (pattern);
-  TYPE_ALIGN (type) = TYPE_ALIGN (pattern);
+  SET_TYPE_ALIGN (type, TYPE_ALIGN (pattern));
   TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (pattern);
   TYPE_FOR_JAVA (type) = TYPE_FOR_JAVA (pattern); /* For libjava's JArray<T> */
   if (ANON_AGGR_TYPE_P (pattern))
@@ -13403,7 +13403,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
 
        if (TYPE_USER_ALIGN (t))
          {
-           TYPE_ALIGN (r) = TYPE_ALIGN (t);
+           SET_TYPE_ALIGN (r, TYPE_ALIGN (t));
            TYPE_USER_ALIGN (r) = 1;
          }
 
index 244c34d0580bd571a3e34789d5826f2a8233d77b..43d5f15fa3f8035fef9f684129c1fc758df4665a 100644 (file)
@@ -1603,7 +1603,7 @@ emit_tinfo_decl (tree decl)
       /* Avoid targets optionally bumping up the alignment to improve
         vector instruction accesses, tinfo are never accessed this way.  */
 #ifdef DATA_ABI_ALIGNMENT
-      DECL_ALIGN (decl) = DATA_ABI_ALIGNMENT (decl, TYPE_ALIGN (TREE_TYPE (decl)));
+      SET_DECL_ALIGN (decl, DATA_ABI_ALIGNMENT (decl, TYPE_ALIGN (TREE_TYPE (decl))));
       DECL_USER_ALIGN (decl) = true;
 #endif
       return true;
index e34215c961eb07d263403a1dac11f5a0b69c577d..112c8c7a565e27f451694671e198d48e20d40e0a 100644 (file)
@@ -1074,7 +1074,7 @@ cp_build_qualified_type_real (tree type,
            {
              t = build_variant_type_copy (t);
              TYPE_NAME (t) = TYPE_NAME (type);
-             TYPE_ALIGN (t) = TYPE_ALIGN (type);
+             SET_TYPE_ALIGN (t, TYPE_ALIGN (type));
              TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (type);
            }
        }
index 2a1073f80cc4db6b185ba98a1e57e7010daf9bcf..cf1df8cc6ecb9a7354a03f6b5fdc6b45b1b7c467 100644 (file)
@@ -300,7 +300,7 @@ init_eh (void)
 #ifdef DONT_USE_BUILTIN_SETJMP
       /* We don't know what the alignment requirements of the
         runtime's jmp_buf has.  Overestimate.  */
-      DECL_ALIGN (f_jbuf) = BIGGEST_ALIGNMENT;
+      SET_DECL_ALIGN (f_jbuf, BIGGEST_ALIGNMENT);
       DECL_USER_ALIGN (f_jbuf) = 1;
 #endif
       DECL_FIELD_CONTEXT (f_jbuf) = sjlj_fc_type_node;
index 29d22b07256ce0adcb8c8eae5249847e144caf4b..248d3d7bf8288846bfa48225751c52a420b0f9ce 100644 (file)
@@ -7712,7 +7712,7 @@ expand_expr_addr_expr_1 (tree exp, rtx target, machine_mode tmode,
     {
       inner = copy_node (inner);
       TREE_TYPE (inner) = copy_node (TREE_TYPE (inner));
-      TYPE_ALIGN (TREE_TYPE (inner)) = TYPE_ALIGN (TREE_TYPE (exp));
+      SET_TYPE_ALIGN (TREE_TYPE (inner), TYPE_ALIGN (TREE_TYPE (exp)));
       TYPE_USER_ALIGN (TREE_TYPE (inner)) = 1;
     }
   result = expand_expr_addr_expr_1 (inner, subtarget, tmode, modifier, as);
index e2f216d2bc6f0560480defd081a0a8dd0e2831d5..086a516b6bc652318c15b99fc6df82732dac58fa 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
+       * trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
+       * trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
+
 2016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
 
        PR fortran/67039
index 21d19287d155f740e6952affc7180e54ba5738d7..44787aebfdecb144234c4e2f8baa36b245b5947e 100644 (file)
@@ -438,7 +438,7 @@ build_common_decl (gfc_common_head *com, tree union_type, bool is_init)
       TREE_STATIC (decl) = 1;
       DECL_IGNORED_P (decl) = 1;
       if (!com->is_bind_c)
-       DECL_ALIGN (decl) = BIGGEST_ALIGNMENT;
+       SET_DECL_ALIGN (decl, BIGGEST_ALIGNMENT);
       else
         {
          /* Do not set the alignment for bind(c) common blocks to
@@ -449,7 +449,7 @@ build_common_decl (gfc_common_head *com, tree union_type, bool is_init)
          tree field = NULL_TREE;
          field = TYPE_FIELDS (TREE_TYPE (decl));
          if (DECL_CHAIN (field) == NULL_TREE)
-           DECL_ALIGN (decl) = TYPE_ALIGN (TREE_TYPE (field));
+           SET_DECL_ALIGN (decl, TYPE_ALIGN (TREE_TYPE (field)));
        }
       DECL_USER_ALIGN (decl) = 0;
       GFC_DECL_COMMON_OR_EQUIV (decl) = 1;
index 23080f0fc6e912fc3583baf6d3665d8c7321caa8..7f64997886395eb2cd34028a7581169527b65a20 100644 (file)
@@ -309,8 +309,8 @@ gfc_build_io_library_fndecls (void)
      alignment that is at least as large as the needed alignment for those
      types.  See the st_parameter_dt structure in libgfortran/io/io.h for
      what really goes into this space.  */
-  TYPE_ALIGN (types[IOPARM_type_pad]) = MAX (TYPE_ALIGN (pchar_type_node),
-                    TYPE_ALIGN (gfc_get_int_type (gfc_intio_kind)));
+  SET_TYPE_ALIGN (types[IOPARM_type_pad], MAX (TYPE_ALIGN (pchar_type_node),
+                    TYPE_ALIGN (gfc_get_int_type (gfc_intio_kind))));
 
   for (ptype = IOPARM_ptype_common; ptype < IOPARM_ptype_num; ptype++)
     gfc_build_st_parameter ((enum ioparam_type) ptype, types);
index a71cf0bcd27a0346f3f8b7bf9436849e4bbbaa4a..dd945aa059af3708a09cd62ee8acc0e62d1afced 100644 (file)
@@ -2275,7 +2275,7 @@ gfc_add_field_to_struct (tree context, tree name, tree type, tree **chain)
   tree decl = gfc_add_field_to_struct_1 (context, name, type, chain);
 
   DECL_INITIAL (decl) = 0;
-  DECL_ALIGN (decl) = 0;
+  SET_DECL_ALIGN (decl, 0);
   DECL_USER_ALIGN (decl) = 0;
 
   return decl;
index 1ac8e26daabe4720efeb70f9260841f9c6340a4f..43a80b428751f4ad73f9015f0cc38ec28520fbef 100644 (file)
@@ -2925,7 +2925,7 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
   size_stored = CEIL_ROUND (size, UNITS_PER_WORD);
   if (stack_parm == 0)
     {
-      DECL_ALIGN (parm) = MAX (DECL_ALIGN (parm), BITS_PER_WORD);
+      SET_DECL_ALIGN (parm, MAX (DECL_ALIGN (parm), BITS_PER_WORD));
       stack_parm = assign_stack_local (BLKmode, size_stored,
                                       DECL_ALIGN (parm));
       if (GET_MODE_SIZE (GET_MODE (entry_parm)) == size)
index 29e9c0a33dcc979c0a11aabd6d119e52fb11c11b..ed012ccfdc66cb89145ce3458b00a19fe9cc846d 100644 (file)
@@ -377,7 +377,7 @@ copy_var_decl (tree var, tree name, tree type)
   DECL_ATTRIBUTES (copy) = DECL_ATTRIBUTES (var);
   if (DECL_USER_ALIGN (var))
     {
-      DECL_ALIGN (copy) = DECL_ALIGN (var);
+      SET_DECL_ALIGN (copy, DECL_ALIGN (var));
       DECL_USER_ALIGN (copy) = 1;
     }
 
index 6c6ed9dcf6d2234e859950a5eefd05619733ca03..f3b419b44a9dd41fd41ef4bf669fcf9715a30830 100644 (file)
@@ -1,3 +1,7 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * go-gcc.cc (Gcc_backend::implicit_variable): Use SET_DECL_ALIGN.
+
 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
 
        * gofrontend/lex.cc: Spelling fixes - behaviour -> behavior and
index 2793bb6090d3ae7396b38f9a68d7971a08a27e6b..1cb3242d5018968f7ef15e364f0d9b18251fd980 100644 (file)
@@ -2687,7 +2687,7 @@ Gcc_backend::implicit_variable(const std::string& name, Btype* type,
     }
   if (alignment != 0)
     {
-      DECL_ALIGN(decl) = alignment * BITS_PER_UNIT;
+      SET_DECL_ALIGN(decl, alignment * BITS_PER_UNIT);
       DECL_USER_ALIGN(decl) = 1;
     }
 
index 9be4b7402cf3b2127c45656db69fec925cc13057..7c20b060cc8058b742f82dc1dbb8bb27737011db 100644 (file)
@@ -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.
index 4f567161eb98449fceabf756e57605600c43d9e7..35874867170450365d9e5843ce7652f43576ff71 100644 (file)
@@ -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;
index 1214eae9f0b404b8ed234f65e4451279b02fdbbc..d2e3db6e4b390583bcfe56a3b020ded8224c462d 100644 (file)
@@ -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
index c940f202baea1a1592a850078d542afb021b1a4b..3b3f0f5c616b6b2c37ad0679c17d3b5817645a8b 100644 (file)
@@ -1,3 +1,7 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * objc-act.c (objc_build_struct): Use SET_DECL_ALIGN.
+
 2016-02-12  Jakub Jelinek  <jakub@redhat.com>
 
        * objc-act.c: Spelling fixes - behaviour -> behavior and
index 8109507c05e08eca1358eb18bfa7cf72335938a7..48564572fa6af4d28f1528123188de6bd422ddfa 100644 (file)
@@ -2115,7 +2115,7 @@ objc_build_struct (tree klass, tree fields, tree super_name)
        = size_binop (FLOOR_DIV_EXPR, convert (sizetype, DECL_SIZE (base)),
                      size_int (BITS_PER_UNIT));
       DECL_ARTIFICIAL (base) = 1;
-      DECL_ALIGN (base) = 1;
+      SET_DECL_ALIGN (base, 1);
       DECL_FIELD_CONTEXT (base) = s;
 #ifdef OBJCPLUS
       DECL_FIELD_IS_BASE (base) = 1;
index 7282cc8a3821121c927a36495dda998ca8d42fdc..50ad68ece77324695a201ba992331e0e1135ca7a 100644 (file)
@@ -1445,12 +1445,12 @@ install_var_field (tree var, bool by_ref, int mask, omp_context *ctx,
   DECL_ABSTRACT_ORIGIN (field) = var;
   if (type == TREE_TYPE (var))
     {
-      DECL_ALIGN (field) = DECL_ALIGN (var);
+      SET_DECL_ALIGN (field, DECL_ALIGN (var));
       DECL_USER_ALIGN (field) = DECL_USER_ALIGN (var);
       TREE_THIS_VOLATILE (field) = TREE_THIS_VOLATILE (var);
     }
   else
-    DECL_ALIGN (field) = TYPE_ALIGN (type);
+    SET_DECL_ALIGN (field, TYPE_ALIGN (type));
 
   if ((mask & 3) == 3)
     {
@@ -1460,7 +1460,7 @@ install_var_field (tree var, bool by_ref, int mask, omp_context *ctx,
          sfield = build_decl (DECL_SOURCE_LOCATION (var),
                               FIELD_DECL, DECL_NAME (var), type);
          DECL_ABSTRACT_ORIGIN (sfield) = var;
-         DECL_ALIGN (sfield) = DECL_ALIGN (field);
+         SET_DECL_ALIGN (sfield, DECL_ALIGN (field));
          DECL_USER_ALIGN (sfield) = DECL_USER_ALIGN (field);
          TREE_THIS_VOLATILE (sfield) = TREE_THIS_VOLATILE (field);
          insert_field_into_struct (ctx->srecord_type, sfield);
@@ -2153,7 +2153,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx,
                  tree field
                    = build_decl (OMP_CLAUSE_LOCATION (c),
                                  FIELD_DECL, NULL_TREE, ptr_type_node);
-                 DECL_ALIGN (field) = TYPE_ALIGN (ptr_type_node);
+                 SET_DECL_ALIGN (field, TYPE_ALIGN (ptr_type_node));
                  insert_field_into_struct (ctx->record_type, field);
                  splay_tree_insert (ctx->field_map, (splay_tree_key) decl,
                                     (splay_tree_value) field);
@@ -2804,18 +2804,18 @@ finish_taskreg_scan (omp_context *ctx)
            TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
            TREE_THIS_VOLATILE (field) = 0;
            DECL_USER_ALIGN (field) = 0;
-           DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
+           SET_DECL_ALIGN (field, TYPE_ALIGN (TREE_TYPE (field)));
            if (TYPE_ALIGN (ctx->record_type) < DECL_ALIGN (field))
-             TYPE_ALIGN (ctx->record_type) = DECL_ALIGN (field);
+             SET_TYPE_ALIGN (ctx->record_type, DECL_ALIGN (field));
            if (ctx->srecord_type)
              {
                tree sfield = lookup_sfield (decl, ctx);
                TREE_TYPE (sfield) = TREE_TYPE (field);
                TREE_THIS_VOLATILE (sfield) = 0;
                DECL_USER_ALIGN (sfield) = 0;
-               DECL_ALIGN (sfield) = DECL_ALIGN (field);
+               SET_DECL_ALIGN (sfield, DECL_ALIGN (field));
                if (TYPE_ALIGN (ctx->srecord_type) < DECL_ALIGN (sfield))
-                 TYPE_ALIGN (ctx->srecord_type) = DECL_ALIGN (sfield);
+                 SET_TYPE_ALIGN (ctx->srecord_type, DECL_ALIGN (sfield));
              }
          }
     }
@@ -18486,8 +18486,8 @@ omp_finish_file (void)
                                                    num_vars * 2);
       tree funcs_decl_type = build_array_type_nelts (pointer_sized_int_node,
                                                     num_funcs);
-      TYPE_ALIGN (vars_decl_type) = TYPE_ALIGN (pointer_sized_int_node);
-      TYPE_ALIGN (funcs_decl_type) = TYPE_ALIGN (pointer_sized_int_node);
+      SET_TYPE_ALIGN (vars_decl_type, TYPE_ALIGN (pointer_sized_int_node));
+      SET_TYPE_ALIGN (funcs_decl_type, TYPE_ALIGN (pointer_sized_int_node));
       tree ctor_v = build_constructor (vars_decl_type, v_v);
       tree ctor_f = build_constructor (funcs_decl_type, v_f);
       TREE_CONSTANT (ctor_v) = TREE_CONSTANT (ctor_f) = 1;
@@ -18503,8 +18503,8 @@ omp_finish_file (void)
         otherwise a joint table in a binary will contain padding between
         tables from multiple object files.  */
       DECL_USER_ALIGN (funcs_decl) = DECL_USER_ALIGN (vars_decl) = 1;
-      DECL_ALIGN (funcs_decl) = TYPE_ALIGN (funcs_decl_type);
-      DECL_ALIGN (vars_decl) = TYPE_ALIGN (vars_decl_type);
+      SET_DECL_ALIGN (funcs_decl, TYPE_ALIGN (funcs_decl_type));
+      SET_DECL_ALIGN (vars_decl, TYPE_ALIGN (vars_decl_type));
       DECL_INITIAL (funcs_decl) = ctor_f;
       DECL_INITIAL (vars_decl) = ctor_v;
       set_decl_section_name (funcs_decl, OFFLOAD_FUNC_TABLE_SECTION_NAME);
index d1738d280b33659e82aca7dbce1e8893e17a22fe..5bae23bb4e524314d09d7d6a18caf5fed0c01f2b 100644 (file)
@@ -579,7 +579,7 @@ do_type_align (tree type, tree decl)
 {
   if (TYPE_ALIGN (type) > DECL_ALIGN (decl))
     {
-      DECL_ALIGN (decl) = TYPE_ALIGN (type);
+      SET_DECL_ALIGN (decl, TYPE_ALIGN (type));
       if (TREE_CODE (decl) == FIELD_DECL)
        DECL_USER_ALIGN (decl) = TYPE_USER_ALIGN (type);
     }
@@ -672,7 +672,7 @@ layout_decl (tree decl, unsigned int known_align)
 #ifdef EMPTY_FIELD_BOUNDARY
                  if (EMPTY_FIELD_BOUNDARY > DECL_ALIGN (decl))
                    {
-                     DECL_ALIGN (decl) = EMPTY_FIELD_BOUNDARY;
+                     SET_DECL_ALIGN (decl, EMPTY_FIELD_BOUNDARY);
                      DECL_USER_ALIGN (decl) = 0;
                    }
 #endif
@@ -694,7 +694,7 @@ layout_decl (tree decl, unsigned int known_align)
                  && !(xalign > BITS_PER_UNIT && DECL_PACKED (decl))
                  && (known_align == 0 || known_align >= xalign))
                {
-                 DECL_ALIGN (decl) = MAX (xalign, DECL_ALIGN (decl));
+                 SET_DECL_ALIGN (decl, MAX (xalign, DECL_ALIGN (decl)));
                  DECL_MODE (decl) = xmode;
                  DECL_BIT_FIELD (decl) = 0;
                }
@@ -719,7 +719,7 @@ layout_decl (tree decl, unsigned int known_align)
         DECL_USER_ALIGN, so we need to check old_user_align instead.  */
       if (packed_p
          && !old_user_align)
-       DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), BITS_PER_UNIT);
+       SET_DECL_ALIGN (decl, MIN (DECL_ALIGN (decl), BITS_PER_UNIT));
 
       if (! packed_p && ! DECL_USER_ALIGN (decl))
        {
@@ -727,11 +727,11 @@ layout_decl (tree decl, unsigned int known_align)
             to a lower boundary than alignment of variables unless
             it was overridden by attribute aligned.  */
 #ifdef BIGGEST_FIELD_ALIGNMENT
-         DECL_ALIGN (decl)
-           = MIN (DECL_ALIGN (decl), (unsigned) BIGGEST_FIELD_ALIGNMENT);
+         SET_DECL_ALIGN (decl, MIN (DECL_ALIGN (decl),
+                                    (unsigned) BIGGEST_FIELD_ALIGNMENT));
 #endif
 #ifdef ADJUST_FIELD_ALIGN
-         DECL_ALIGN (decl) = ADJUST_FIELD_ALIGN (decl, DECL_ALIGN (decl));
+         SET_DECL_ALIGN (decl, ADJUST_FIELD_ALIGN (decl, DECL_ALIGN (decl)));
 #endif
        }
 
@@ -741,7 +741,7 @@ layout_decl (tree decl, unsigned int known_align)
        mfa = maximum_field_alignment;
       /* Should this be controlled by DECL_USER_ALIGN, too?  */
       if (mfa != 0)
-       DECL_ALIGN (decl) = MIN (DECL_ALIGN (decl), mfa);
+       SET_DECL_ALIGN (decl, MIN (DECL_ALIGN (decl), mfa));
     }
 
   /* Evaluate nonconstant size only once, either now or as soon as safe.  */
@@ -791,7 +791,7 @@ relayout_decl (tree decl)
   DECL_SIZE (decl) = DECL_SIZE_UNIT (decl) = 0;
   DECL_MODE (decl) = VOIDmode;
   if (!DECL_USER_ALIGN (decl))
-    DECL_ALIGN (decl) = 0;
+    SET_DECL_ALIGN (decl, 0);
   SET_DECL_RTL (decl, 0);
 
   layout_decl (decl, 0);
@@ -1572,10 +1572,10 @@ finalize_record_size (record_layout_info rli)
 
   /* Determine the desired alignment.  */
 #ifdef ROUND_TYPE_ALIGN
-  TYPE_ALIGN (rli->t) = ROUND_TYPE_ALIGN (rli->t, TYPE_ALIGN (rli->t),
-                                         rli->record_align);
+  SET_TYPE_ALIGN (rli->t, ROUND_TYPE_ALIGN (rli->t, TYPE_ALIGN (rli->t),
+                                           rli->record_align));
 #else
-  TYPE_ALIGN (rli->t) = MAX (TYPE_ALIGN (rli->t), rli->record_align);
+  SET_TYPE_ALIGN (rli->t, MAX (TYPE_ALIGN (rli->t), rli->record_align));
 #endif
 
   /* Compute the size so far.  Be sure to allow for extra bits in the
@@ -1732,15 +1732,15 @@ finalize_type_size (tree type)
         alignment of one of the fields.  */
       if (mode_align >= TYPE_ALIGN (type))
        {
-         TYPE_ALIGN (type) = mode_align;
+         SET_TYPE_ALIGN (type, mode_align);
          TYPE_USER_ALIGN (type) = 0;
        }
     }
 
   /* Do machine-dependent extra alignment.  */
 #ifdef ROUND_TYPE_ALIGN
-  TYPE_ALIGN (type)
-    = ROUND_TYPE_ALIGN (type, TYPE_ALIGN (type), BITS_PER_UNIT);
+  SET_TYPE_ALIGN (type,
+                  ROUND_TYPE_ALIGN (type, TYPE_ALIGN (type), BITS_PER_UNIT));
 #endif
 
   /* If we failed to find a simple way to calculate the unit size
@@ -1793,7 +1793,7 @@ finalize_type_size (tree type)
            valign = MAX (valign, TYPE_ALIGN (variant));
          else
            TYPE_USER_ALIGN (variant) = user_align;
-         TYPE_ALIGN (variant) = valign;
+         SET_TYPE_ALIGN (variant, valign);
          TYPE_PRECISION (variant) = precision;
          SET_TYPE_MODE (variant, mode);
        }
@@ -2087,7 +2087,7 @@ finish_builtin_struct (tree type, const char *name, tree fields,
 
   if (align_type)
     {
-      TYPE_ALIGN (type) = TYPE_ALIGN (align_type);
+      SET_TYPE_ALIGN (type, TYPE_ALIGN (align_type));
       TYPE_USER_ALIGN (type) = TYPE_USER_ALIGN (align_type);
     }
 
@@ -2200,7 +2200,7 @@ layout_type (tree type)
           Instead, query a target hook, defaulting to natural alignment.
           This prevents ABI changes depending on whether or not native
           vector modes are supported.  */
-       TYPE_ALIGN (type) = targetm.vector_alignment (type);
+       SET_TYPE_ALIGN (type, targetm.vector_alignment (type));
 
        /* However, if the underlying mode requires a bigger alignment than
           what the target hook provides, we cannot use the mode.  For now,
@@ -2212,7 +2212,7 @@ layout_type (tree type)
 
     case VOID_TYPE:
       /* This is an incomplete type and so doesn't have a size.  */
-      TYPE_ALIGN (type) = 1;
+      SET_TYPE_ALIGN (type, 1);
       TYPE_USER_ALIGN (type) = 0;
       SET_TYPE_MODE (type, VOIDmode);
       break;
@@ -2337,7 +2337,7 @@ layout_type (tree type)
 #else
        align = MAX (align, BITS_PER_UNIT);
 #endif
-       TYPE_ALIGN (type) = align;
+       SET_TYPE_ALIGN (type, align);
        SET_TYPE_MODE (type, BLKmode);
        if (TYPE_SIZE (type) != 0
            && ! targetm.member_type_forces_blk (type, VOIDmode)
@@ -2609,13 +2609,13 @@ initialize_sizetypes (void)
 
   /* Now layout both types manually.  */
   SET_TYPE_MODE (sizetype, smallest_mode_for_size (precision, MODE_INT));
-  TYPE_ALIGN (sizetype) = GET_MODE_ALIGNMENT (TYPE_MODE (sizetype));
+  SET_TYPE_ALIGN (sizetype, GET_MODE_ALIGNMENT (TYPE_MODE (sizetype)));
   TYPE_SIZE (sizetype) = bitsize_int (precision);
   TYPE_SIZE_UNIT (sizetype) = size_int (GET_MODE_SIZE (TYPE_MODE (sizetype)));
   set_min_and_max_values_for_integral_type (sizetype, precision, UNSIGNED);
 
   SET_TYPE_MODE (bitsizetype, smallest_mode_for_size (bprecision, MODE_INT));
-  TYPE_ALIGN (bitsizetype) = GET_MODE_ALIGNMENT (TYPE_MODE (bitsizetype));
+  SET_TYPE_ALIGN (bitsizetype, GET_MODE_ALIGNMENT (TYPE_MODE (bitsizetype)));
   TYPE_SIZE (bitsizetype) = bitsize_int (bprecision);
   TYPE_SIZE_UNIT (bitsizetype)
     = size_int (GET_MODE_SIZE (TYPE_MODE (bitsizetype)));
index e69dc1789f02c4b5c47f7eb7928bb86abd8b3e14..9bf33273fe131d1d321c3618ee5cbe211dae55c9 100644 (file)
@@ -2153,7 +2153,7 @@ increase_alignment_1 (symtab_node *n, void *v)
   if (DECL_ALIGN (n->decl) < align
       && n->can_increase_alignment_p ())
     {
-      DECL_ALIGN (n->decl) = align;
+      SET_DECL_ALIGN (n->decl, align);
       DECL_USER_ALIGN (n->decl) = 1;
     }
   return false;
index a34227705d2b31894d6380855cb3173e9c09400e..6b4601b719a9da4c463adaadbd07b3b401ba1ac3 100644 (file)
@@ -1856,7 +1856,7 @@ std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
   if (boundary < TYPE_ALIGN (type))
     {
       type = build_variant_type_copy (type);
-      TYPE_ALIGN (type) = boundary;
+      SET_TYPE_ALIGN (type, boundary);
     }
 
   /* Compute the rounded size of the type.  */
index 41c1a9bd329ca8e145632072423933eb25fa4e12..0d48ff59d52392ac004c14842bc46ad2bf491ce1 100644 (file)
@@ -1441,7 +1441,13 @@ struct GTY(()) tree_type_common {
   unsigned lang_flag_5 : 1;
   unsigned lang_flag_6 : 1;
 
-  unsigned int align;
+  /* TYPE_ALIGN in log2; this has to be large enough to hold values
+     of the maximum of BIGGEST_ALIGNMENT and MAX_OFILE_ALIGNMENT,
+     the latter being usually the larger.  For ELF it is 8<<28,
+     so we need to store the value 32 (not 31, as we need the zero
+     as well), hence six bits.  */
+  unsigned align : 6;
+  unsigned spare : 26;
   alias_set_type alias_set;
   tree pointer_to;
   tree reference_to;
@@ -1542,12 +1548,12 @@ struct GTY(()) tree_decl_common {
   unsigned decl_nonshareable_flag : 1;
 
   /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs.  */
-  unsigned int off_align : 8;
-
-  /* 24 bits unused.  */
+  unsigned int off_align : 6;
 
   /* DECL_ALIGN.  It should have the same size as TYPE_ALIGN.  */
-  unsigned int align;
+  unsigned int align : 6;
+
+  /* 20 bits unused.  */
 
   /* UID for points-to sets, stable over copying from inlining.  */
   unsigned int pt_uid;
index 8563687e9e53ca943c2be2c7005c858f6b1df937..25a92aaa04b4b1427551c5b831144ab00b4cd628 100644 (file)
@@ -192,7 +192,7 @@ insert_field_into_struct (tree type, tree field)
 
   /* Set correct alignment for frame struct type.  */
   if (TYPE_ALIGN (type) < DECL_ALIGN (field))
-    TYPE_ALIGN (type) = DECL_ALIGN (field);
+    SET_TYPE_ALIGN (type, DECL_ALIGN (field));
 }
 
 /* Build or return the RECORD_TYPE that describes the frame state that is
@@ -275,14 +275,14 @@ lookup_field_for_decl (struct nesting_info *info, tree decl,
       if (use_pointer_in_frame (decl))
        {
          TREE_TYPE (field) = build_pointer_type (TREE_TYPE (decl));
-         DECL_ALIGN (field) = TYPE_ALIGN (TREE_TYPE (field));
+         SET_DECL_ALIGN (field, TYPE_ALIGN (TREE_TYPE (field)));
          DECL_NONADDRESSABLE_P (field) = 1;
        }
       else
        {
           TREE_TYPE (field) = TREE_TYPE (decl);
           DECL_SOURCE_LOCATION (field) = DECL_SOURCE_LOCATION (decl);
-          DECL_ALIGN (field) = DECL_ALIGN (decl);
+          SET_DECL_ALIGN (field, DECL_ALIGN (decl));
           DECL_USER_ALIGN (field) = DECL_USER_ALIGN (decl);
           TREE_ADDRESSABLE (field) = TREE_ADDRESSABLE (decl);
           DECL_NONADDRESSABLE_P (field) = !TREE_ADDRESSABLE (decl);
@@ -361,7 +361,7 @@ get_chain_field (struct nesting_info *info)
       field = make_node (FIELD_DECL);
       DECL_NAME (field) = get_identifier ("__chain");
       TREE_TYPE (field) = type;
-      DECL_ALIGN (field) = TYPE_ALIGN (type);
+      SET_DECL_ALIGN (field, TYPE_ALIGN (type));
       DECL_NONADDRESSABLE_P (field) = 1;
 
       insert_field_into_struct (get_frame_type (info), field);
@@ -474,7 +474,7 @@ get_trampoline_type (struct nesting_info *info)
   t = build_array_type (char_type_node, t);
   t = build_decl (DECL_SOURCE_LOCATION (info->context),
                  FIELD_DECL, get_identifier ("__data"), t);
-  DECL_ALIGN (t) = align;
+  SET_DECL_ALIGN (t, align);
   DECL_USER_ALIGN (t) = 1;
 
   trampoline_type = make_node (RECORD_TYPE);
@@ -548,7 +548,7 @@ get_nl_goto_field (struct nesting_info *info)
       field = make_node (FIELD_DECL);
       DECL_NAME (field) = get_identifier ("__nl_goto_buf");
       TREE_TYPE (field) = type;
-      DECL_ALIGN (field) = TYPE_ALIGN (type);
+      SET_DECL_ALIGN (field, TYPE_ALIGN (type));
       TREE_ADDRESSABLE (field) = 1;
 
       insert_field_into_struct (get_frame_type (info), field);
index a501d2cf03fd7fb8783620d7782818f3fb6d04a2..2568a415eea4ce913342b8fca55496db93a4ecd7 100644 (file)
@@ -2114,7 +2114,7 @@ fold_builtin_alloca_with_align (gimple *stmt)
   n_elem = size * 8 / BITS_PER_UNIT;
   array_type = build_array_type_nelts (elem_type, n_elem);
   var = create_tmp_var (array_type);
-  DECL_ALIGN (var) = TREE_INT_CST_LOW (gimple_call_arg (stmt, 1));
+  SET_DECL_ALIGN (var, TREE_INT_CST_LOW (gimple_call_arg (stmt, 1)));
   {
     struct ptr_info_def *pi = SSA_NAME_PTR_INFO (lhs);
     if (pi != NULL && !pi->pt.anything)
index 91c72eb293e9b53eb0aa9ec4359c0aa5a86fabc4..2ad2f9212fa163116e2e9b5f88295309c2d7e994 100644 (file)
@@ -230,10 +230,10 @@ unpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr)
   DECL_PRESERVE_P (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_EXTERNAL (expr) = (unsigned) bp_unpack_value (bp, 1);
   DECL_GIMPLE_REG_P (expr) = (unsigned) bp_unpack_value (bp, 1);
-  DECL_ALIGN (expr) = (unsigned) bp_unpack_var_len_unsigned (bp);
+  SET_DECL_ALIGN (expr, (unsigned) bp_unpack_var_len_unsigned (bp));
 #ifdef ACCEL_COMPILER
   if (DECL_ALIGN (expr) > targetm.absolute_biggest_alignment)
-    DECL_ALIGN (expr) = targetm.absolute_biggest_alignment;
+    SET_DECL_ALIGN (expr, targetm.absolute_biggest_alignment);
 #endif
   if (TREE_CODE (expr) == LABEL_DECL)
     {
@@ -378,10 +378,10 @@ unpack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
   else if (TREE_CODE (expr) == ARRAY_TYPE)
     TYPE_NONALIASED_COMPONENT (expr) = (unsigned) bp_unpack_value (bp, 1);
   TYPE_PRECISION (expr) = bp_unpack_var_len_unsigned (bp);
-  TYPE_ALIGN (expr) = bp_unpack_var_len_unsigned (bp);
+  SET_TYPE_ALIGN (expr, bp_unpack_var_len_unsigned (bp));
 #ifdef ACCEL_COMPILER
   if (TYPE_ALIGN (expr) > targetm.absolute_biggest_alignment)
-    TYPE_ALIGN (expr) = targetm.absolute_biggest_alignment;
+    SET_TYPE_ALIGN (expr, targetm.absolute_biggest_alignment);
 #endif
 }
 
index cd5afeafebd6b21996e50ea9e9d2ed6389764843..5f054c53447711afa3bd4eb56348ca8ff4ce25e8 100644 (file)
@@ -5131,7 +5131,7 @@ ensure_base_align (stmt_vec_info stmt_info, struct data_reference *dr)
        symtab_node::get (base_decl)->increase_alignment (TYPE_ALIGN (vectype));
       else
        {
-          DECL_ALIGN (base_decl) = TYPE_ALIGN (vectype);
+          SET_DECL_ALIGN (base_decl, TYPE_ALIGN (vectype));
           DECL_USER_ALIGN (base_decl) = 1;
        }
       DR_VECT_AUX (dr)->base_misaligned = false;
index c64d7204acb831cfd6502e69ee7a4a3c5dd4a011..6de46a84695fccbb3d93ee2fc97aeab998a9857f 100644 (file)
@@ -1020,11 +1020,11 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
        {
          if (code == FUNCTION_DECL)
            {
-             DECL_ALIGN (t) = FUNCTION_BOUNDARY;
+             SET_DECL_ALIGN (t, FUNCTION_BOUNDARY);
              DECL_MODE (t) = FUNCTION_MODE;
            }
          else
-           DECL_ALIGN (t) = 1;
+           SET_DECL_ALIGN (t, 1);
        }
       DECL_SOURCE_LOCATION (t) = input_location;
       if (TREE_CODE (t) == DEBUG_EXPR_DECL)
@@ -1041,7 +1041,7 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
 
     case tcc_type:
       TYPE_UID (t) = next_type_uid++;
-      TYPE_ALIGN (t) = BITS_PER_UNIT;
+      SET_TYPE_ALIGN (t, BITS_PER_UNIT);
       TYPE_USER_ALIGN (t) = 0;
       TYPE_MAIN_VARIANT (t) = t;
       TYPE_CANONICAL (t) = t;
@@ -6646,7 +6646,7 @@ build_qualified_type (tree type, int type_quals)
              /* Ensure the alignment of this type is compatible with
                 the required alignment of the atomic type.  */
              if (TYPE_ALIGN (atomic_type) > TYPE_ALIGN (t))
-               TYPE_ALIGN (t) = TYPE_ALIGN (atomic_type);
+               SET_TYPE_ALIGN (t, TYPE_ALIGN (atomic_type));
            }
        }
 
@@ -6685,7 +6685,7 @@ build_aligned_type (tree type, unsigned int align)
       return t;
 
   t = build_variant_type_copy (type);
-  TYPE_ALIGN (t) = align;
+  SET_TYPE_ALIGN (t, align);
 
   return t;
 }
@@ -8135,7 +8135,7 @@ build_range_type_1 (tree type, tree lowval, tree highval, bool shared)
   SET_TYPE_MODE (itype, TYPE_MODE (type));
   TYPE_SIZE (itype) = TYPE_SIZE (type);
   TYPE_SIZE_UNIT (itype) = TYPE_SIZE_UNIT (type);
-  TYPE_ALIGN (itype) = TYPE_ALIGN (type);
+  SET_TYPE_ALIGN (itype, TYPE_ALIGN (type));
   TYPE_USER_ALIGN (itype) = TYPE_USER_ALIGN (type);
 
   if (!shared)
@@ -10036,7 +10036,7 @@ build_atomic_base (tree type, unsigned int align)
   set_type_quals (t, TYPE_QUAL_ATOMIC);
 
   if (align)
-    TYPE_ALIGN (t) = align;
+    SET_TYPE_ALIGN (t, align);
 
   return t;
 }
@@ -10185,7 +10185,7 @@ build_common_tree_nodes (bool signed_char)
 
   /* 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;
+  SET_TYPE_ALIGN (void_type_node, BITS_PER_UNIT);
   TYPE_USER_ALIGN (void_type_node) = 0;
 
   void_node = make_node (VOID_CST);
index 87e756390f6e09ffb1b8a4d9f74fb8bfbc6685bd..33833a7abe65322bdb14457cf3e7412d1df272f8 100644 (file)
@@ -916,10 +916,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
    of this type is aligned at least to the alignment of the type, even if it
    doesn't appear that it is.  We see this, for example, in object-oriented
    languages where a tag field may show this is an object of a more-aligned
-   variant of the more generic type.
-
-   In an SSA_NAME node, nonzero if the SSA_NAME node is on the SSA_NAME
-   freelist.  */
+   variant of the more generic type.  */
 #define TYPE_ALIGN_OK(NODE) (TYPE_CHECK (NODE)->base.nothrow_flag)
 
 /* Used in classes in C++.  */
@@ -1865,8 +1862,15 @@ extern machine_mode element_mode (const_tree t);
 #define TYPE_ATTRIBUTES(NODE) (TYPE_CHECK (NODE)->type_common.attributes)
 
 /* The alignment necessary for objects of this type.
-   The value is an int, measured in bits.  */
-#define TYPE_ALIGN(NODE) (TYPE_CHECK (NODE)->type_common.align)
+   The value is an int, measured in bits and must be a power of two.
+   We support also an "alignement" of zero.  */
+#define TYPE_ALIGN(NODE) \
+    (TYPE_CHECK (NODE)->type_common.align \
+     ? ((unsigned)1) << ((NODE)->type_common.align - 1) : 0)
+
+/* Specify that TYPE_ALIGN(NODE) is X.  */
+#define SET_TYPE_ALIGN(NODE, X) \
+    (TYPE_CHECK (NODE)->type_common.align = ffs_hwi (X))
 
 /* 1 if the alignment for this type was requested by "aligned" attribute,
    0 if it is the default for this type.  */
@@ -2306,8 +2310,16 @@ extern machine_mode element_mode (const_tree t);
 #define DECL_SIZE(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size)
 /* Likewise for the size in bytes.  */
 #define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit)
-/* Holds the alignment required for the datum, in bits.  */
-#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align)
+/* Returns the alignment required for the datum, in bits.  It must
+   be a power of two, but an "alignment" of zero is supported
+   (e.g. as "uninitialized" sentinel).  */
+#define DECL_ALIGN(NODE) \
+    (DECL_COMMON_CHECK (NODE)->decl_common.align \
+     ? ((unsigned)1) << ((NODE)->decl_common.align - 1) : 0)
+/* Specify that DECL_ALIGN(NODE) is X.  */
+#define SET_DECL_ALIGN(NODE, X) \
+    (DECL_COMMON_CHECK (NODE)->decl_common.align = ffs_hwi (X))
+
 /* The alignment of NODE, in bytes.  */
 #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
 /* Set if the alignment of this DECL has been set by the user, for
@@ -2510,7 +2522,7 @@ extern void decl_value_expr_insert (tree, tree);
 #define DECL_OFFSET_ALIGN(NODE) \
   (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.off_align)
 
-/* Specify that DECL_ALIGN(NODE) is a multiple of X.  */
+/* Specify that DECL_OFFSET_ALIGN(NODE) is X.  */
 #define SET_DECL_OFFSET_ALIGN(NODE, X) \
   (FIELD_DECL_CHECK (NODE)->decl_common.off_align = ffs_hwi (X) - 1)
 
index b0f2af03de492b1499ab52a73a49d2ec33920045..d71defac590f04adb21b21abed8e5c41e1fa1bba 100644 (file)
@@ -1053,7 +1053,7 @@ align_variable (tree decl, bool dont_output_data)
 
   /* Reset the alignment in case we have made it tighter, so we can benefit
      from it in get_pointer_alignment.  */
-  DECL_ALIGN (decl) = align;
+  SET_DECL_ALIGN (decl, align);
 }
 
 /* Return DECL_ALIGN (decl), possibly increased for optimization purposes
@@ -2187,8 +2187,8 @@ assemble_variable (tree decl, int top_level ATTRIBUTE_UNUSED,
       && asan_protect_global (decl))
     {
       asan_protected = true;
-      DECL_ALIGN (decl) = MAX (DECL_ALIGN (decl), 
-                               ASAN_RED_ZONE_SIZE * BITS_PER_UNIT);
+      SET_DECL_ALIGN (decl, MAX (DECL_ALIGN (decl),
+                                ASAN_RED_ZONE_SIZE * BITS_PER_UNIT));
     }
 
   set_mem_align (decl_rtl, DECL_ALIGN (decl));
@@ -3249,7 +3249,7 @@ build_constant_desc (tree exp)
      architectures so use DATA_ALIGNMENT as well, except for strings.  */
   if (TREE_CODE (exp) == STRING_CST)
     {
-      DECL_ALIGN (decl) = CONSTANT_ALIGNMENT (exp, DECL_ALIGN (decl));
+      SET_DECL_ALIGN (decl, CONSTANT_ALIGNMENT (exp, DECL_ALIGN (decl)));
     }
   else
     align_variable (decl, 0);
@@ -3404,8 +3404,8 @@ output_constant_def_contents (rtx symbol)
       && asan_protect_global (exp))
     {
       asan_protected = true;
-      DECL_ALIGN (decl) = MAX (DECL_ALIGN (decl),
-                              ASAN_RED_ZONE_SIZE * BITS_PER_UNIT);
+      SET_DECL_ALIGN (decl, MAX (DECL_ALIGN (decl),
+                                ASAN_RED_ZONE_SIZE * BITS_PER_UNIT));
     }
 
   /* If the constant is part of an object block, make sure that the
index a65af09c6e666aecd20aa5d74ee9d7e7459aaa1e..1ce7671b201ddfbf62471f04aaa92440f1c25515 100644 (file)
@@ -1,3 +1,7 @@
+2016-04-18  Michael Matz  <matz@suse.de>
+
+       * plugin.cc (plugin_finish_record_or_union): Use SET_TYPE_ALIGN.
+
 2016-04-11  Segher Boessenkool  <segher@kernel.crashing.org>
 
        PR bootstrap/70173
@@ -60,7 +64,7 @@
        * configure.ac (libcc1_cv_lib_sockets): Check for -lsocket -lnsl.
        * configure: Regenerate.
        * connection.cc: Include <string.h>.
-        * libcc1.cc (libcc1_compile): Use AF_UNIX instead of AF_LOCAL.
+       * libcc1.cc (libcc1_compile): Use AF_UNIX instead of AF_LOCAL.
 
 2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
index 57fca7c9a7ba8d9541ab5e30fe920b0a1d1ca2de..44d0d607022d6e9bc86154d2ba8fc0f61ade4823 100644 (file)
@@ -553,8 +553,8 @@ plugin_finish_record_or_union (cc1_plugin::connection *,
     {
       // FIXME there's no way to get this from DWARF,
       // or even, it seems, a particularly good way to deduce it.
-      TYPE_ALIGN (record_or_union_type)
-       = TYPE_PRECISION (pointer_sized_int_node);
+      SET_TYPE_ALIGN (record_or_union_type,
+                     TYPE_PRECISION (pointer_sized_int_node));
 
       TYPE_SIZE (record_or_union_type) = bitsize_int (size_in_bytes
                                                      * BITS_PER_UNIT);
This page took 0.434807 seconds and 5 git commands to generate.