diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-03-23 20:43:44 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-03-23 15:43:44 -0500 |
commit | 22421b79c8da16dd6dccb2232c1da6096590e525 (patch) | |
tree | 78c56d654a5d59c1b915116b930d92efc18f678e /gcc/ada/utils.c | |
parent | 95e59f1ada8f85e0aff9bff2748e5c8a763daae3 (diff) | |
download | gcc-22421b79c8da16dd6dccb2232c1da6096590e525.zip gcc-22421b79c8da16dd6dccb2232c1da6096590e525.tar.gz gcc-22421b79c8da16dd6dccb2232c1da6096590e525.tar.bz2 |
alias.c (get_alias_set): Add support for TYPE_REF_CAN_ALIAS_ALL.
* alias.c (get_alias_set): Add support for TYPE_REF_CAN_ALIAS_ALL.
* c-common.c (handle_mode_attribute): Add extra arg to
build_pointer_type_for_mode and build_reference_type_for_mode.
* c-typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
for INTEGER_CST.
* tree.c (build_pointer_type_for_mode): Add arg CAN_ALIAS_ALL.
Chain pointers via TYPE_NEXT_PTR_TO.
(build_reference_type_for_mode): Similarly.
(build_type_no_quals): Add extra arg to build_pointer_type_for_mode
and build_reference_type_for_mode.
(tree_check4_failed): New function.
* tree.h (TREE_CHECK4, PTR_OR_REF_CHECK): New macros.
(TYPE_REF_CAN_ALIAS_ALL, TYPE_NEXT_PTR_TO, TYPE_NEXT_REF_TO): Likewise.
(TREE_NO_UNSUED_WARNING, TREE_VIA_VIRTUAL, TREE_CONSTANT_OVERFLOW):
Add check.
* cp/typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
for INTEGER_CST.
* ada/decl.c (gnat_to_gnu_entity, case E_Access_Type): Pass value
of No_Strict_Aliasing to build_pointer_type_for_mode.
* ada/utils.c (update_pointer_to): Walk pointer and ref chains.
From-SVN: r79873
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index cd3f47c..1c012fe 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -2665,24 +2665,30 @@ update_pointer_to (tree old_type, tree new_type) /* Otherwise, first handle the simple case. */ if (TREE_CODE (new_type) != UNCONSTRAINED_ARRAY_TYPE) { - if (ptr != 0) - TREE_TYPE (ptr) = new_type; TYPE_POINTER_TO (new_type) = ptr; - - if (ref != 0) - TREE_TYPE (ref) = new_type; TYPE_REFERENCE_TO (new_type) = ref; - if (ptr != 0 && TYPE_NAME (ptr) != 0 - && TREE_CODE (TYPE_NAME (ptr)) == TYPE_DECL - && TREE_CODE (new_type) != ENUMERAL_TYPE) - rest_of_decl_compilation (TYPE_NAME (ptr), NULL, - global_bindings_p (), 0); - if (ref != 0 && TYPE_NAME (ref) != 0 - && TREE_CODE (TYPE_NAME (ref)) == TYPE_DECL - && TREE_CODE (new_type) != ENUMERAL_TYPE) - rest_of_decl_compilation (TYPE_NAME (ref), NULL, - global_bindings_p (), 0); + for (; ptr; ptr = TYPE_NEXT_PTR_TO (ptr)) + { + TREE_TYPE (ptr) = new_type; + + if (TYPE_NAME (ptr) != 0 + && TREE_CODE (TYPE_NAME (ptr)) == TYPE_DECL + && TREE_CODE (new_type) != ENUMERAL_TYPE) + rest_of_decl_compilation (TYPE_NAME (ptr), NULL, + global_bindings_p (), 0); + } + + for (; ref; ref = TYPE_NEXT_PTR_TO (ref)) + { + TREE_TYPE (ref) = new_type; + + if (TYPE_NAME (ref) != 0 + && TREE_CODE (TYPE_NAME (ref)) == TYPE_DECL + && TREE_CODE (new_type) != ENUMERAL_TYPE) + rest_of_decl_compilation (TYPE_NAME (ref), NULL, + global_bindings_p (), 0); + } } /* Now deal with the unconstrained array case. In this case the "pointer" |