From f6aa36b95e2607c6fbeccb22230fc5dd9d8486d4 Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 6 Nov 2012 10:20:41 +0000 Subject: 2012-11-06 Robert Dewar * par_sco.adb, bindgen.adb, exp_vfpt.adb, exp_vfpt.ads, exp_ch2.adb, errout.adb, sem_ch8.adb: Minor reformatting. 2012-11-06 Hristian Kirtchev * einfo.adb: Include Loop_Entry_Attributes to the list of Node/List/Elist10 usage. (Loop_Entry_Attributes): New routine. (Set_Loop_Entry_Attributes): New routine. (Write_Field10_Name): Add an output string for Loop_Entry_Attributes. * einfo.ads: Define new attribute Loop_Entry_Attributes along with its usage in nodes. (Loop_Entry_Attributes): New routine and dedicated pragma Inline. (Set_Loop_Entry_Attributes): New routine and dedicated pragma Inline. * exp_attr.adb (Expand_N_Attribute_Reference): Do not expand Attribute_Loop_Entry here. * exp_ch5.adb: Add with and use clause for Elists; (Expand_Loop_Entry_Attributes): New routine. (Expand_N_Loop_Statement): Add a call to Expand_Loop_Entry_Attributes. * exp_prag.adb (Expand_Pragma_Loop_Assertion): Specialize the search to include multiple nested loops produced by the expansion of Ada 2012 array iterator. * sem_attr.adb: Add with and use clause for Elists. (Analyze_Attribute): Check the legality of attribute Loop_Entry. (Resolve_Attribute): Nothing to do for Loop_Entry. (S14_Attribute): New routine. * snames.ads-tmpl: Add a comment on entries marked with HiLite. Add new name Name_Loop_Entry. Add new attribute Attribute_Loop_Entry. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193227 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/einfo.adb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc/ada/einfo.adb') diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index bfa7593dc5d..7e3073ef384 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -33,6 +33,7 @@ pragma Style_Checks (All_Checks); -- Turn off subprogram ordering, not used for this unit with Atree; use Atree; +with Errout; use Errout; with Namet; use Namet; with Nlists; use Nlists; with Output; use Output; @@ -90,6 +91,7 @@ package body Einfo is -- Discriminal_Link Node10 -- Float_Rep Uint10 (but returns Float_Rep_Kind) -- Handler_Records List10 + -- Loop_Entry_Attributes Elist10 -- Normalized_Position_Max Uint10 -- Component_Bit_Offset Uint11 @@ -2246,6 +2248,12 @@ package body Einfo is return Node16 (Id); end Lit_Strings; + function Loop_Entry_Attributes (Id : E) return L is + begin + pragma Assert (Ekind (Id) = E_Loop); + return Elist10 (Id); + end Loop_Entry_Attributes; + function Low_Bound_Tested (Id : E) return B is begin return Flag205 (Id); @@ -4791,6 +4799,12 @@ package body Einfo is Set_Node16 (Id, V); end Set_Lit_Strings; + procedure Set_Loop_Entry_Attributes (Id : E; V : L) is + begin + pragma Assert (Ekind (Id) = E_Loop); + Set_Elist10 (Id, V); + end Set_Loop_Entry_Attributes; + procedure Set_Low_Bound_Tested (Id : E; V : B := True) is begin pragma Assert (Is_Formal (Id)); @@ -6967,6 +6981,7 @@ package body Einfo is -- previous errors. elsif No (Etyp) then + Cascaded_Error; return T; elsif Is_Private_Type (T) and then Etyp = Full_View (T) then @@ -7874,6 +7889,9 @@ package body Einfo is E_Procedure => Write_Str ("Handler_Records"); + when E_Loop => + Write_Str ("Loop_Entry_Attributes"); + when E_Component | E_Discriminant => Write_Str ("Normalized_Position_Max"); -- cgit v1.2.1