Commit d436b30d by Arnaud Charlet

[multiple changes]

2013-04-24  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Host_Entry): Introduce intermediate copy of
	memory location pointed to by Hostent_H_Addr, as it might not
	have sufficient alignment.

2013-04-24  Yannick Moy  <moy@adacore.com>

	* repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
	calling subprograms which may read it.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb: Remove Loop_Entry_Attributes from the usage of
	nodes. Flag 260 is now used.
	(Has_Loop_Entry_Attributes): New routine.
	(Loop_Entry_Attributes): Removed.
	(Set_Has_Loop_Entry_Attributes): New routine.
	(Set_Loop_Entry_Attributes): Removed.
	(Write_Entity_Flags): Write out Flag 260.
	(Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
	* einfo.ads: Remove attribute Loop_Entry_Attributes,
	its related comment and uses in nodes.	Add new attribute
	Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
	(Has_Loop_Entry_Attributes): New routine and pragma Inline.
	(Loop_Entry_Attributes): Removed along with pragma Inline.
	(Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
	(Set_Loop_Entry_Attributes): Removed along with pragma Inline.
	* exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
	(Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
	* exp_ch5.adb: Remove with and use clause for Elists.
	(Expand_Loop_Entry_Attributes): Removed.
	(Expand_N_Loop_Statement): Add local variable Stmt. Rename local
	constant Isc to Scheme. When a loop is subject to attribute
	'Loop_Entry, retrieve the nested loop from the conditional
	block. Move the processing of controlled object at the end of
	loop expansion.
	* sem_attr.adb (Analyze_Attribute): Do not chain attribute
	'Loop_Entry to its related loop.
	* sem_ch5.adb (Analyze_Loop_Statement): Add local variable
	Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
	the entire loop is rewritten into a block.  Retrieve the nested
	loop in such cases to complete the analysis.
	* sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
	routine.
	(Subject_To_Loop_Entry_Attributes): New routine.

2013-04-24  Robert Dewar  <dewar@adacore.com>

	* exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
	(Loop_Variant, xxx) rather than Assert (xxx).
	* gnat_rm.texi: Document pragma Loop_Variant.
	* sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
	to S14_Pragma.

From-SVN: r198235
parent 06b599fd
2013-04-24 Thomas Quinot <quinot@adacore.com>
* g-socket.adb (Host_Entry): Introduce intermediate copy of
memory location pointed to by Hostent_H_Addr, as it might not
have sufficient alignment.
2013-04-24 Yannick Moy <moy@adacore.com>
* repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
calling subprograms which may read it.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Remove Loop_Entry_Attributes from the usage of
nodes. Flag 260 is now used.
(Has_Loop_Entry_Attributes): New routine.
(Loop_Entry_Attributes): Removed.
(Set_Has_Loop_Entry_Attributes): New routine.
(Set_Loop_Entry_Attributes): Removed.
(Write_Entity_Flags): Write out Flag 260.
(Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
* einfo.ads: Remove attribute Loop_Entry_Attributes,
its related comment and uses in nodes. Add new attribute
Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
(Has_Loop_Entry_Attributes): New routine and pragma Inline.
(Loop_Entry_Attributes): Removed along with pragma Inline.
(Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
(Set_Loop_Entry_Attributes): Removed along with pragma Inline.
* exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
(Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
* exp_ch5.adb: Remove with and use clause for Elists.
(Expand_Loop_Entry_Attributes): Removed.
(Expand_N_Loop_Statement): Add local variable Stmt. Rename local
constant Isc to Scheme. When a loop is subject to attribute
'Loop_Entry, retrieve the nested loop from the conditional
block. Move the processing of controlled object at the end of
loop expansion.
* sem_attr.adb (Analyze_Attribute): Do not chain attribute
'Loop_Entry to its related loop.
* sem_ch5.adb (Analyze_Loop_Statement): Add local variable
Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
the entire loop is rewritten into a block. Retrieve the nested
loop in such cases to complete the analysis.
* sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
routine.
(Subject_To_Loop_Entry_Attributes): New routine.
2013-04-24 Robert Dewar <dewar@adacore.com>
* exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
(Loop_Variant, xxx) rather than Assert (xxx).
* gnat_rm.texi: Document pragma Loop_Variant.
* sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
to S14_Pragma.
2013-04-24 Yannick Moy <moy@adacore.com>
* adabkend.adb, ali-util.adb, ali.adb, debug.adb,
......
......@@ -93,7 +93,6 @@ 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
......@@ -548,8 +547,7 @@ package body Einfo is
-- Is_Invariant_Procedure Flag257
-- Has_Dynamic_Predicate_Aspect Flag258
-- Has_Static_Predicate_Aspect Flag259
-- (unused) Flag260
-- Has_Loop_Entry_Attributes Flag260
-- (unused) Flag261
-- (unused) Flag262
......@@ -1467,6 +1465,12 @@ package body Einfo is
return Flag232 (Id);
end Has_Invariants;
function Has_Loop_Entry_Attributes (Id : E) return B is
begin
pragma Assert (Ekind (Id) = E_Loop);
return Flag260 (Id);
end Has_Loop_Entry_Attributes;
function Has_Machine_Radix_Clause (Id : E) return B is
begin
pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
......@@ -2396,12 +2400,6 @@ 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);
......@@ -4051,6 +4049,12 @@ package body Einfo is
Set_Flag232 (Id, V);
end Set_Has_Invariants;
procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
begin
pragma Assert (Ekind (Id) = E_Loop);
Set_Flag260 (Id, V);
end Set_Has_Loop_Entry_Attributes;
procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
begin
pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
......@@ -5022,12 +5026,6 @@ 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));
......@@ -7816,6 +7814,7 @@ package body Einfo is
W ("Has_Inheritable_Invariants", Flag248 (Id));
W ("Has_Initial_Value", Flag219 (Id));
W ("Has_Invariants", Flag232 (Id));
W ("Has_Loop_Entry_Attributes", Flag260 (Id));
W ("Has_Machine_Radix_Clause", Flag83 (Id));
W ("Has_Master_Entity", Flag21 (Id));
W ("Has_Missing_Return", Flag142 (Id));
......@@ -8268,9 +8267,6 @@ 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");
......
......@@ -1598,6 +1598,11 @@ package Einfo is
-- Note that it might be the full type which has inheritable invariants,
-- and then the flag will also be set in the private type.
-- Has_Loop_Entry_Attributes (Flag260)
-- Defined in E_Loop entities. Set when the loop is subject to at least
-- one attribute 'Loop_Entry. The flag also implies that the loop has
-- already been transformed. See Expand_Loop_Entry_Attribute for details.
-- Has_Machine_Radix_Clause (Flag83)
-- Defined in decimal types and subtypes, set if a Machine_Radix
-- representation clause is present. This flag is used to detect
......@@ -3033,10 +3038,6 @@ package Einfo is
-- the nature and use of this entity for implementing the Image and
-- Value attributes for the enumeration type in question.
-- Loop_Entry_Attributes (Elist10)
-- Defined for loop statement scopes. The list contains all Loop_Entry
-- attribute references related to the target loop.
-- Low_Bound_Tested (Flag205)
-- Defined in all entities. Currently this can only be set True for
-- formal parameter entries of a standard unconstrained one-dimensional
......@@ -5507,8 +5508,8 @@ package Einfo is
-- E_Loop
-- First_Exit_Statement (Node8)
-- Loop_Entry_Attributes (Elist10)
-- Has_Exit (Flag47)
-- Has_Loop_Entry_Attributes (Flag260)
-- Has_Master_Entity (Flag21)
-- Has_Nested_Block_With_Handler (Flag101)
......@@ -6280,6 +6281,7 @@ package Einfo is
function Has_Initial_Value (Id : E) return B;
function Has_Interrupt_Handler (Id : E) return B;
function Has_Invariants (Id : E) return B;
function Has_Loop_Entry_Attributes (Id : E) return B;
function Has_Machine_Radix_Clause (Id : E) return B;
function Has_Master_Entity (Id : E) return B;
function Has_Missing_Return (Id : E) return B;
......@@ -6444,7 +6446,6 @@ package Einfo is
function Limited_View (Id : E) return E;
function Lit_Indexes (Id : E) return E;
function Lit_Strings (Id : E) return E;
function Loop_Entry_Attributes (Id : E) return L;
function Low_Bound_Tested (Id : E) return B;
function Machine_Radix_10 (Id : E) return B;
function Master_Id (Id : E) return E;
......@@ -6887,6 +6888,7 @@ package Einfo is
procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True);
procedure Set_Has_Initial_Value (Id : E; V : B := True);
procedure Set_Has_Invariants (Id : E; V : B := True);
procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True);
procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True);
procedure Set_Has_Master_Entity (Id : E; V : B := True);
procedure Set_Has_Missing_Return (Id : E; V : B := True);
......@@ -7057,7 +7059,6 @@ package Einfo is
procedure Set_Limited_View (Id : E; V : E);
procedure Set_Lit_Indexes (Id : E; V : E);
procedure Set_Lit_Strings (Id : E; V : E);
procedure Set_Loop_Entry_Attributes (Id : E; V : L);
procedure Set_Low_Bound_Tested (Id : E; V : B := True);
procedure Set_Machine_Radix_10 (Id : E; V : B := True);
procedure Set_Master_Id (Id : E; V : E);
......@@ -7586,6 +7587,7 @@ package Einfo is
pragma Inline (Has_Inheritable_Invariants);
pragma Inline (Has_Initial_Value);
pragma Inline (Has_Invariants);
pragma Inline (Has_Loop_Entry_Attributes);
pragma Inline (Has_Machine_Radix_Clause);
pragma Inline (Has_Master_Entity);
pragma Inline (Has_Missing_Return);
......@@ -7795,7 +7797,6 @@ package Einfo is
pragma Inline (Limited_View);
pragma Inline (Lit_Indexes);
pragma Inline (Lit_Strings);
pragma Inline (Loop_Entry_Attributes);
pragma Inline (Low_Bound_Tested);
pragma Inline (Machine_Radix_10);
pragma Inline (Master_Id);
......@@ -8043,6 +8044,7 @@ package Einfo is
pragma Inline (Set_Has_Inheritable_Invariants);
pragma Inline (Set_Has_Initial_Value);
pragma Inline (Set_Has_Invariants);
pragma Inline (Set_Has_Loop_Entry_Attributes);
pragma Inline (Set_Has_Machine_Radix_Clause);
pragma Inline (Set_Has_Master_Entity);
pragma Inline (Set_Has_Missing_Return);
......@@ -8212,7 +8214,6 @@ package Einfo is
pragma Inline (Set_Limited_View);
pragma Inline (Set_Lit_Indexes);
pragma Inline (Set_Lit_Strings);
pragma Inline (Set_Loop_Entry_Attributes);
pragma Inline (Set_Low_Bound_Tested);
pragma Inline (Set_Machine_Radix_10);
pragma Inline (Set_Master_Id);
......
......@@ -830,9 +830,9 @@ package body Exp_Prag is
-- if Flag then
-- if Curr_1 /= Old_1 then
-- pragma Assert (Curr_1 > Old_1);
-- pragma Check (Loop_Variant, Curr_1 > Old_1);
-- else
-- pragma Assert (Curr_2 < Old_2);
-- pragma Check (Loop_Variant, Curr_2 < Old_2);
-- end if;
-- else
-- Flag := True;
......@@ -999,13 +999,15 @@ package body Exp_Prag is
-- Step 5: Create corresponding assertion to verify change of value
-- Generate:
-- pragma Assert (Curr <|> Old);
-- pragma Check (Loop_Variant, Curr <|> Old);
Prag :=
Make_Pragma (Loc,
Chars => Name_Assert,
Chars => Name_Check,
Pragma_Argument_Associations => New_List (
Make_Pragma_Argument_Association (Loc,
Expression => Make_Identifier (Loc, Name_Loop_Variant)),
Make_Pragma_Argument_Association (Loc,
Expression =>
Make_Op (Loc,
Curr_Val => New_Reference_To (Curr_Id, Loc),
......
......@@ -2485,8 +2485,8 @@ package body GNAT.Sockets is
Aliases_Count, Addresses_Count : Natural;
-- H_Length is not used because it is currently only set to 4
-- H_Addrtype is always AF_INET
-- H_Length is not used because it is currently only ever set to 4, as
-- H_Addrtype is always AF_INET.
begin
Aliases_Count := 0;
......@@ -2514,10 +2514,24 @@ package body GNAT.Sockets is
for J in Result.Addresses'Range loop
declare
Addr : In_Addr;
for Addr'Address use
Hostent_H_Addr (E, C.int (J - Result.Addresses'First));
pragma Import (Ada, Addr);
-- Hostent_H_Addr (E, <index>) may return an address that is
-- not correctly aligned for In_Addr, so we need to use
-- an intermediate copy operation on a type with an alignemnt
-- of 1 to recover the value.
subtype Addr_Buf_T is C.char_array (1 .. Addr'Size / 8);
Unaligned_Addr : Addr_Buf_T;
for Unaligned_Addr'Address
use Hostent_H_Addr (E, C.int (J - Result.Addresses'First));
pragma Import (Ada, Unaligned_Addr);
Aligned_Addr : Addr_Buf_T;
for Aligned_Addr'Address use Addr'Address;
pragma Import (Ada, Aligned_Addr);
begin
Aligned_Addr := Unaligned_Addr;
To_Inet_Addr (Addr, Result.Addresses (J));
end;
end loop;
......
......@@ -180,6 +180,7 @@ Implementation Defined Pragmas
* Pragma Linker_Section::
* Pragma Long_Float::
* Pragma Loop_Optimize::
* Pragma Loop_Variant::
* Pragma Machine_Attribute::
* Pragma Main::
* Pragma Main_Storage::
......@@ -937,6 +938,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma Linker_Section::
* Pragma Long_Float::
* Pragma Loop_Optimize::
* Pragma Loop_Variant::
* Pragma Machine_Attribute::
* Pragma Main::
* Pragma Main_Storage::
......@@ -4040,6 +4042,45 @@ compiler in order to enable the relevant optimizations, that is to say
@option{-funroll-loops} for unrolling and @option{-ftree-vectorize} for
vectorization.
@node Pragma Loop_Variant
@unnumberedsec Pragma Loop_Variant
@findex Loop_Variant
@noindent
Syntax:
@smallexample @c ada
pragma Loop_Variant ( LOOP_VARIANT_ITEM @{, LOOP_VARIANT_ITEM @} );
LOOP_VARIANT_ITEM ::= CHANGE_DIRECTION => discrete_EXPRESSION
CHANGE_DIRECTION ::= Increases | Decreases
@end smallexample
@noindent
This pragma must appear immediately within the sequence of statements of a
loop statement. It allows the specification of quantities which must always
decrease or increase in successive iterations of the loop. In its simplest
form, just one expression is specified, whose value must increase or decrease
on each iteration of the loop.
In a more complex form, multiple arguments can be given which are intepreted
in a nesting lexicographic manner. For example:
@smallexample @c ada
pragma Loop_Variant (Increases => X, Decreases => Y);
@end smallexample
@noindent
specifies that each time through the loop either X increases, or X stays
the same and Y decreases. A @code{Loop_Variant} pragma ensures that the
loop is making progress. It can be useful in helping to show informally
or prove formally that the loop always terminates.
@code{Loop_Variant} is an assertion whose effect can be controlled using
an @code{Assertion_Policy} with a check name of @code{Loop_Variant}. The
policy can be @code{Check} to enable the loop variant check, @code{Ignore}
to ignore the check (in which case the pragma has no effect on the program),
or @code{Disable} in which case the pragma is not even checked for correct
syntax.
@node Pragma Machine_Attribute
@unnumberedsec Pragma Machine_Attribute
@findex Machine_Attribute
......
......@@ -114,7 +114,8 @@ package body Repinfo is
Table_Name => "FE_Rep_Table");
Unit_Casing : Casing_Type;
-- Identifier casing for current unit
-- Identifier casing for current unit. This is set by List_Rep_Info for
-- each unit, before calling subprograms which may read it.
Need_Blank_Line : Boolean;
-- Set True if a blank line is needed before outputting any information for
......@@ -988,11 +989,11 @@ package body Repinfo is
then
for U in Main_Unit .. Last_Unit loop
if In_Extended_Main_Source_Unit (Cunit_Entity (U)) then
Unit_Casing := Identifier_Casing (Source_Index (U));
-- Normal case, list to standard output
if not List_Representation_Info_To_File then
Unit_Casing := Identifier_Casing (Source_Index (U));
Write_Eol;
Write_Str ("Representation information for unit ");
Write_Unit_Name (Unit_Name (U));
......
......@@ -3891,19 +3891,7 @@ package body Sem_Attr is
Error_Attr_P ("prefix of attribute % must denote an entity");
end if;
Set_Etype (N, Etype (P));
-- Associate the attribute with its related loop
if No (Loop_Entry_Attributes (Loop_Id)) then
Set_Loop_Entry_Attributes (Loop_Id, New_Elmt_List);
end if;
-- A Loop_Entry may be [pre]analyzed several times, depending on the
-- context. Ensure that it appears only once in the attributes list
-- of the related loop.
Append_Unique_Elmt (N, Loop_Entry_Attributes (Loop_Id));
Set_Etype (N, P_Type);
end Loop_Entry;
-------------
......
......@@ -2545,6 +2545,7 @@ package body Sem_Ch5 is
Iter : constant Node_Id := Iteration_Scheme (N);
Loc : constant Source_Ptr := Sloc (N);
Ent : Entity_Id;
Stmt : Node_Id;
-- Start of processing for Analyze_Loop_Statement
......@@ -2707,13 +2708,22 @@ package body Sem_Ch5 is
Analyze_Statements (Statements (N));
end if;
-- When the iteration scheme of a loop contains attribute 'Loop_Entry,
-- the loop is transformed into a conditional block. Retrieve the loop.
Stmt := N;
if Subject_To_Loop_Entry_Attributes (Stmt) then
Stmt := Find_Loop_In_Conditional_Block (Stmt);
end if;
-- Finish up processing for the loop. We kill all current values, since
-- in general we don't know if the statements in the loop have been
-- executed. We could do a bit better than this with a loop that we
-- know will execute at least once, but it's not worth the trouble and
-- the front end is not in the business of flow tracing.
Process_End_Label (N, 'e', Ent);
Process_End_Label (Stmt, 'e', Ent);
End_Scope;
Kill_Current_Values;
......@@ -2724,15 +2734,15 @@ package body Sem_Ch5 is
-- before making this call, since Check_Infinite_Loop_Warning relies on
-- being able to use semantic visibility information to find references.
if Comes_From_Source (N) then
Check_Infinite_Loop_Warning (N);
if Comes_From_Source (Stmt) then
Check_Infinite_Loop_Warning (Stmt);
end if;
-- Code after loop is unreachable if the loop has no WHILE or FOR and
-- contains no EXIT statements within the body of the loop.
if No (Iter) and then not Has_Exit (Ent) then
Check_Unreachable_Code (N);
Check_Unreachable_Code (Stmt);
end if;
end Analyze_Loop_Statement;
......
......@@ -13962,7 +13962,6 @@ package body Sem_Prag is
begin
GNAT_Pragma;
S14_Pragma;
Check_At_Least_N_Arguments (1);
Check_Loop_Pragma_Placement;
......
......@@ -4740,6 +4740,41 @@ package body Sem_Util is
raise Program_Error;
end Find_Corresponding_Discriminant;
------------------------------------
-- Find_Loop_In_Conditional_Block --
------------------------------------
function Find_Loop_In_Conditional_Block (N : Node_Id) return Node_Id is
Stmt : Node_Id;
begin
Stmt := N;
if Nkind (Stmt) = N_If_Statement then
Stmt := First (Then_Statements (Stmt));
end if;
pragma Assert (Nkind (Stmt) = N_Block_Statement);
-- Inspect the statements of the conditional block. In general the loop
-- should be the first statement in the statement sequence of the block,
-- but the finalization machinery may have introduced extra object
-- declarations.
Stmt := First (Statements (Handled_Statement_Sequence (Stmt)));
while Present (Stmt) loop
if Nkind (Stmt) = N_Loop_Statement then
return Stmt;
end if;
Next (Stmt);
end loop;
-- The expansion of attribute 'Loop_Entry produced a malformed block
raise Program_Error;
end Find_Loop_In_Conditional_Block;
--------------------------
-- Find_Overlaid_Entity --
--------------------------
......@@ -13870,6 +13905,33 @@ package body Sem_Util is
and then not Is_Formal (Entity (R2));
end Statically_Different;
--------------------------------------
-- Subject_To_Loop_Entry_Attributes --
--------------------------------------
function Subject_To_Loop_Entry_Attributes (N : Node_Id) return Boolean is
Stmt : Node_Id;
begin
Stmt := N;
-- The expansion mechanism transform a loop subject to at least one
-- 'Loop_Entry attribute into a conditional block. Infinite loops lack
-- the conditional part.
if Nkind_In (Stmt, N_Block_Statement, N_If_Statement)
and then Nkind (Original_Node (N)) = N_Loop_Statement
then
Stmt := Original_Node (N);
end if;
return
Nkind (Stmt) = N_Loop_Statement
and then Present (Identifier (Stmt))
and then Present (Entity (Identifier (Stmt)))
and then Has_Loop_Entry_Attributes (Entity (Identifier (Stmt)));
end Subject_To_Loop_Entry_Attributes;
-----------------------------
-- Subprogram_Access_Level --
-----------------------------
......
......@@ -474,6 +474,11 @@ package Sem_Util is
-- analyzed. Subsequent uses of this id on a different type denotes the
-- discriminant at the same position in this new type.
function Find_Loop_In_Conditional_Block (N : Node_Id) return Node_Id;
-- Find the nested loop statement in a conditional block. Loops subject to
-- attribute 'Loop_Entry are transformed into blocks. Parts of the original
-- loop are nested within the block.
procedure Find_Overlaid_Entity
(N : Node_Id;
Ent : out Entity_Id;
......@@ -1524,6 +1529,10 @@ package Sem_Util is
-- Return True if it can be statically determined that the Expressions
-- E1 and E2 refer to different objects
function Subject_To_Loop_Entry_Attributes (N : Node_Id) return Boolean;
-- Determine whether node N is a loop statement subject to at least one
-- 'Loop_Entry attribute.
function Subprogram_Access_Level (Subp : Entity_Id) return Uint;
-- Return the accessibility level of the view denoted by Subp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment