diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2010-09-20 20:11:35 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-09-20 20:11:35 +0000 |
commit | 523e82a7a3204343688a56345ed5e99df777aea5 (patch) | |
tree | 4291df90e4876f78bbfe40aed9ee9925facd6467 /gcc/ada/gcc-interface/decl.c | |
parent | 8d03ad011afc65df43816e253af7728a738cb3f8 (diff) | |
download | gcc-523e82a7a3204343688a56345ed5e99df777aea5.zip gcc-523e82a7a3204343688a56345ed5e99df777aea5.tar.gz gcc-523e82a7a3204343688a56345ed5e99df777aea5.tar.bz2 |
langhooks.h (struct lang_hooks_for_types): Remove hash_types field.
* langhooks.h (struct lang_hooks_for_types): Remove hash_types field.
* langhooks-def.h (LANG_HOOKS_HASH_TYPES): Delete.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Remove LANG_HOOKS_HASH_TYPES.
* system.h (LANG_HOOKS_HASH_TYPES): Poison.
* tree.c (type_hash_canon): Do not test lang_hooks.types.hash_types.
(build_nonstandard_integer_type): Likewise.
(build_range_type_1): New function, built from...
(build_range_type): ...this. Call build_range_type_1.
(build_nonshared_range_type): New function.
(build_array_type_1): New function, built from...
(build_array_type: ...this. Call build_array_type_1.
(build_nonshared_array_type): New function.
* tree.h (build_nonshared_range_type): Declare.
(build_nonshared_array_type): Likewise.
ada/
* gcc-interface/decl.c (gnat_to_gnu_entity): Replace calls to
build_array_type with calls to build_nonshared_array_type.
(substitute_in_type): Likewise.
* gcc-interface/misc.c (LANG_HOOKS_HASH_TYPES): Delete.
(LANG_HOOKS_TYPE_HASH_EQ): Define.
(gnat_post_options): Add 'static' keyword.
(gnat_type_hash_eq): New static function.
* gcc-interface/utils.c (fntype_same_flags_p): New function.
(create_subprog_type): Call it.
(create_index_type): Call build_nonshared_range_type and tidy up.
(create_range_type): Likewise.
* gcc-interface/gigi.h (fntype_same_flags_p): Declare.
From-SVN: r164452
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index c9ca2a6..0669875 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -2070,7 +2070,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* Now build the array type. */ for (index = ndim - 1; index >= 0; index--) { - tem = build_array_type (tem, gnu_index_types[index]); + tem = build_nonshared_array_type (tem, gnu_index_types[index]); TYPE_MULTI_ARRAY_P (tem) = (index > 0); if (array_type_has_nonaliased_component (tem, gnat_entity)) TYPE_NONALIASED_COMPONENT (tem) = 1; @@ -2403,7 +2403,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* Now build the array type. */ for (index = ndim - 1; index >= 0; index --) { - gnu_type = build_array_type (gnu_type, gnu_index_types[index]); + gnu_type = build_nonshared_array_type (gnu_type, + gnu_index_types[index]); TYPE_MULTI_ARRAY_P (gnu_type) = (index > 0); if (array_type_has_nonaliased_component (gnu_type, gnat_entity)) TYPE_NONALIASED_COMPONENT (gnu_type) = 1; @@ -2649,8 +2650,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnat_entity); gnu_type - = build_array_type (gnat_to_gnu_type (Component_Type (gnat_entity)), - gnu_index_type); + = build_nonshared_array_type (gnat_to_gnu_type + (Component_Type (gnat_entity)), + gnu_index_type); if (array_type_has_nonaliased_component (gnu_type, gnat_entity)) TYPE_NONALIASED_COMPONENT (gnu_type) = 1; relate_alias_sets (gnu_type, gnu_string_type, ALIAS_SET_COPY); @@ -8610,7 +8612,7 @@ substitute_in_type (tree t, tree f, tree r) if (component == TREE_TYPE (t) && domain == TYPE_DOMAIN (t)) return t; - nt = build_array_type (component, domain); + nt = build_nonshared_array_type (component, domain); TYPE_ALIGN (nt) = TYPE_ALIGN (t); TYPE_USER_ALIGN (nt) = TYPE_USER_ALIGN (t); SET_TYPE_MODE (nt, TYPE_MODE (t)); |