diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-18 17:59:58 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-18 17:59:58 +0000 |
commit | 294ad253df60fd15778fcd60c71e6c0cc5ca9f86 (patch) | |
tree | a6c2d68c4c26a332f0f3e10f6dfc96b421b72af7 /gcc/ada/gcc-interface/decl.c | |
parent | 048e14fc025471eff2817942c51171349bed580d (diff) | |
download | gcc-294ad253df60fd15778fcd60c71e6c0cc5ca9f86.tar.gz |
* gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
lieu of more verbose construct.
* gcc-interface/trans.c (Call_to_gnu): Likewise.
(gnat_to_gnu): Likewise. Remove obsolete code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210585 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 59ec0571b66..33cf08424d5 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -543,10 +543,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) This is a workaround for major problems in protected type handling. */ Entity_Id Scop = Scope (Scope (gnat_entity)); - if ((Is_Protected_Type (Scop) - || (Is_Private_Type (Scop) - && Present (Full_View (Scop)) - && Is_Protected_Type (Full_View (Scop)))) + if (Is_Protected_Type (Underlying_Type (Scop)) && Present (Original_Record_Component (gnat_entity))) { gnu_decl @@ -870,9 +867,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* If this is an aliased object with an unconstrained nominal subtype, make a type that includes the template. */ if (Is_Constr_Subt_For_UN_Aliased (Etype (gnat_entity)) - && (Is_Array_Type (Etype (gnat_entity)) - || (Is_Private_Type (Etype (gnat_entity)) - && Is_Array_Type (Full_View (Etype (gnat_entity))))) + && Is_Array_Type (Underlying_Type (Etype (gnat_entity))) && !type_annotate_only) { tree gnu_array @@ -1383,9 +1378,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) Note that we have to do that this late because of the couple of allocation adjustments that might be made just above. */ if (Is_Constr_Subt_For_UN_Aliased (Etype (gnat_entity)) - && (Is_Array_Type (Etype (gnat_entity)) - || (Is_Private_Type (Etype (gnat_entity)) - && Is_Array_Type (Full_View (Etype (gnat_entity))))) + && Is_Array_Type (Underlying_Type (Etype (gnat_entity))) && !type_annotate_only) { tree gnu_array |