summaryrefslogtreecommitdiffstats
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-13 18:10:49 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-13 18:10:49 +0000
commitbbc2ab67443d869681beff2302dac89957d69cc2 (patch)
tree426e4bc3cd3eadacc2a1434004a4933e098e1a8c /gcc/ada/gcc-interface/utils.c
parentdbf017578410d69b175d5c9d8ea6716a54786d21 (diff)
downloadppe42-gcc-bbc2ab67443d869681beff2302dac89957d69cc2.tar.gz
ppe42-gcc-bbc2ab67443d869681beff2302dac89957d69cc2.zip
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_General_Access_Type>:
Build a stub DECL for the dummy fat pointer type in the unconstrained array case. * gcc-interface/utils.c (update_pointer_to): Set the DECL_ORIGINAL_TYPE for all the variants in the fat pointer case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167758 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index fa2d0969726..d0449571d85 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -3501,15 +3501,16 @@ update_pointer_to (tree old_type, tree new_type)
{
TYPE_MAIN_VARIANT (t) = new_ptr;
SET_TYPE_UNCONSTRAINED_ARRAY (t, new_type);
- }
- /* And show the original pointer NEW_PTR to the debugger. This is the
- counterpart of the equivalent processing in gnat_pushdecl when the
- unconstrained array type is frozen after access types to it. */
- if (TYPE_NAME (ptr) && TREE_CODE (TYPE_NAME (ptr)) == TYPE_DECL)
- {
- DECL_ORIGINAL_TYPE (TYPE_NAME (ptr)) = new_ptr;
- DECL_ARTIFICIAL (TYPE_NAME (ptr)) = 0;
+ /* And show the original pointer NEW_PTR to the debugger. This is
+ the counterpart of the special processing for fat pointer types
+ in gnat_pushdecl, but when the unconstrained array type is only
+ frozen after access types to it. */
+ if (TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL)
+ {
+ DECL_ORIGINAL_TYPE (TYPE_NAME (t)) = new_ptr;
+ DECL_ARTIFICIAL (TYPE_NAME (t)) = 0;
+ }
}
/* Now handle updating the allocation record, what the thin pointer
OpenPOWER on IntegriCloud