diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-16 11:01:53 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-16 11:01:53 +0000 |
commit | 36ac5fbb86ae5778529b8bbebaf0e0e1744eb6be (patch) | |
tree | 84ccc871dc5fdb6b16df1277042294ec753ecebe /gcc/ada/sem_ch13.adb | |
parent | 14fd9219039e56e8b14cf366555ecaae127c4a20 (diff) | |
download | gcc-36ac5fbb86ae5778529b8bbebaf0e0e1744eb6be.tar.gz |
2015-10-16 Arnaud Charlet <charlet@adacore.com>
* exp_ch5.adb, sem_ch3.adb, frontend.adb, exp_ch7.adb, exp_ch7.ads,
sem_ch5.adb, sem_type.adb, exp_util.adb, exp_util.ads, comperr.adb,
exp_attr.adb, sinfo.ads, exp_ch9.adb, make.adb, usage.adb,
lib-writ.adb, sem_ch9.adb, bindgen.adb, debug.adb, einfo.adb,
einfo.ads, types.ads, checks.adb, sem_prag.adb, s-tasini.adb,
rtsfind.ads, freeze.adb, sem_util.adb, sem_util.ads, exp_dbug.adb,
gnatlink.adb, gnat1drv.adb, targparm.adb, targparm.ads, exp_ch4.adb,
exp_ch11.adb, repinfo.adb, s-soflin.adb, s-soflin.ads, exp_ch6.adb,
exp_ch13.adb, sem_mech.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb,
sem_ch8.adb, exp_disp.ads, snames.adb-tmpl, exp_aggr.adb, sem_eval.adb,
exp_intr.adb, sem_ch13.adb, snames.ads-tmpl, sem_disp.adb, exp_ch3.adb:
Code clean up: remove special handling for .NET and JVM.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228874 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 91 |
1 files changed, 26 insertions, 65 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index f05ad7fdb79..71df079f69c 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -4924,49 +4924,36 @@ package body Sem_Ch13 is -- will be used to represent the biased subtype that reflects -- the biased representation of components. We need the subtype -- to get proper conversions on referencing elements of the - -- array. Note: component size clauses are ignored in VM mode. - - if VM_Target = No_VM then - if Biased then - New_Ctyp := - Make_Defining_Identifier (Loc, - Chars => - New_External_Name (Chars (U_Ent), 'C', 0, 'T')); - - Decl := - Make_Subtype_Declaration (Loc, - Defining_Identifier => New_Ctyp, - Subtype_Indication => - New_Occurrence_Of (Component_Type (Btype), Loc)); - - Set_Parent (Decl, N); - Analyze (Decl, Suppress => All_Checks); - - Set_Has_Delayed_Freeze (New_Ctyp, False); - Set_Esize (New_Ctyp, Csize); - Set_RM_Size (New_Ctyp, Csize); - Init_Alignment (New_Ctyp); - Set_Is_Itype (New_Ctyp, True); - Set_Associated_Node_For_Itype (New_Ctyp, U_Ent); - - Set_Component_Type (Btype, New_Ctyp); - Set_Biased (New_Ctyp, N, "component size clause"); - end if; + -- array. - Set_Component_Size (Btype, Csize); + if Biased then + New_Ctyp := + Make_Defining_Identifier (Loc, + Chars => + New_External_Name (Chars (U_Ent), 'C', 0, 'T')); - -- For VM case, we ignore component size clauses + Decl := + Make_Subtype_Declaration (Loc, + Defining_Identifier => New_Ctyp, + Subtype_Indication => + New_Occurrence_Of (Component_Type (Btype), Loc)); - else - -- Give a warning unless we are in GNAT mode, in which case - -- the warning is suppressed since it is not useful. + Set_Parent (Decl, N); + Analyze (Decl, Suppress => All_Checks); - if not GNAT_Mode then - Error_Msg_N - ("component size ignored in this configuration??", N); - end if; + Set_Has_Delayed_Freeze (New_Ctyp, False); + Set_Esize (New_Ctyp, Csize); + Set_RM_Size (New_Ctyp, Csize); + Init_Alignment (New_Ctyp); + Set_Is_Itype (New_Ctyp, True); + Set_Associated_Node_For_Itype (New_Ctyp, U_Ent); + + Set_Component_Type (Btype, New_Ctyp); + Set_Biased (New_Ctyp, N, "component size clause"); end if; + Set_Component_Size (Btype, Csize); + -- Deal with warning on overridden size if Warn_On_Overridden_Size @@ -5142,12 +5129,6 @@ package body Sem_Ch13 is ("static string required for tag name!", Nam); end if; - if VM_Target /= No_VM then - Error_Msg_Name_1 := Attr; - Error_Msg_N - ("% attribute unsupported in this configuration", Nam); - end if; - if not Is_Library_Level_Entity (U_Ent) then Error_Msg_NE ("??non-unique external tag supplied for &", N, U_Ent); @@ -5463,16 +5444,6 @@ package body Sem_Ch13 is ("size cannot be given for unconstrained array", Nam); elsif Size /= No_Uint then - if VM_Target /= No_VM and then not GNAT_Mode then - - -- Size clause is not handled properly on VM targets. - -- Display a warning unless we are in GNAT mode, in which - -- case this is useless. - - Error_Msg_N - ("size clauses are ignored in this configuration??", N); - end if; - if Is_Type (U_Ent) then Etyp := U_Ent; else @@ -11356,7 +11327,7 @@ package body Sem_Ch13 is Address_Clause_Checks.Init; Unchecked_Conversions.Init; - if VM_Target /= No_VM or else AAMP_On_Target then + if AAMP_On_Target then Independence_Checks.Init; end if; end Initialize; @@ -12412,17 +12383,7 @@ package body Sem_Ch13 is and then Known_Component_Size (T2) and then Component_Size (T1) = Component_Size (T2) then - if VM_Target = No_VM then - return True; - - -- In VM targets the representation of arrays with aliased - -- components differs from arrays with non-aliased components - - else - return Has_Aliased_Components (Base_Type (T1)) - = - Has_Aliased_Components (Base_Type (T2)); - end if; + return True; end if; end if; |