From: ebotcazou Date: Thu, 28 Apr 2016 10:49:13 +0000 (+0000) Subject: Backport from mainline X-Git-Tag: upstream/6.1~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=629b270c63ebc62234b2f6f02dd084ae8c8b5791;p=platform%2Fupstream%2Flinaro-gcc.git Backport from mainline 2016-04-27 Eric Botcazou PR ada/70759 * stor-layout.h (internal_reference_types): Delete. * stor-layout.c (reference_types_internal): Likewise. (internal_reference_types): Likewise. (layout_type) : Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@235553 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc85cf8..88faaba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2016-04-28 Eric Botcazou + + Backport from mainline + 2016-04-27 Eric Botcazou + + PR ada/70759 + * stor-layout.h (internal_reference_types): Delete. + * stor-layout.c (reference_types_internal): Likewise. + (internal_reference_types): Likewise. + (layout_type) : Adjust. + 2016-04-27 Bill Schmidt Backport from mainline diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7b0b08b..a235c06 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2016-04-28 Eric Botcazou + + Backport from mainline + 2016-04-27 Eric Botcazou + + * gcc-interface/misc.c (gnat_init): Do not call + internal_reference_types. + 2016-04-27 Release Manager * GCC 6.1.0 released. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 61a61fa..521f8b9 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -369,9 +369,6 @@ gnat_init (void) sbitsize_one_node = sbitsize_int (1); sbitsize_unit_node = sbitsize_int (BITS_PER_UNIT); - /* Show that REFERENCE_TYPEs are internal and should be Pmode. */ - internal_reference_types (); - /* Register our internal error function. */ global_dc->internal_error = &internal_error_function; diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index d1738d2..26581e3 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -49,11 +49,6 @@ tree sizetype_tab[(int) stk_type_kind_last]; The value is measured in bits. */ unsigned int maximum_field_alignment = TARGET_DEFAULT_PACK_STRUCT * BITS_PER_UNIT; -/* Nonzero if all REFERENCE_TYPEs are internal and hence should be allocated - in the address spaces' address_mode, not pointer_mode. Set only by - internal_reference_types called only by a front end. */ -static int reference_types_internal = 0; - static tree self_referential_size (tree); static void finalize_record_size (record_layout_info); static void finalize_type_size (tree); @@ -62,15 +57,6 @@ static int excess_unit_span (HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, tree); extern void debug_rli (record_layout_info); -/* Show that REFERENCE_TYPES are internal and should use address_mode. - Called only by front end. */ - -void -internal_reference_types (void) -{ - reference_types_internal = 1; -} - /* Given a size SIZE that may not be a constant, return a SAVE_EXPR to serve as the actual size-expression for a type or decl. */ @@ -2245,12 +2231,6 @@ layout_type (tree type) case REFERENCE_TYPE: { machine_mode mode = TYPE_MODE (type); - if (TREE_CODE (type) == REFERENCE_TYPE && reference_types_internal) - { - addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (type)); - mode = targetm.addr_space.address_mode (as); - } - TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (mode)); TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (mode)); TYPE_UNSIGNED (type) = 1; diff --git a/gcc/stor-layout.h b/gcc/stor-layout.h index b240ea1..d25661b 100644 --- a/gcc/stor-layout.h +++ b/gcc/stor-layout.h @@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see extern void set_min_and_max_values_for_integral_type (tree, int, signop); extern void fixup_signed_type (tree); -extern void internal_reference_types (void); extern unsigned int update_alignment_for_field (record_layout_info, tree, unsigned int); extern record_layout_info start_record_layout (tree);