Commit 3128f955 by Arnaud Charlet

[multiple changes]

2011-12-05  Bob Duff  <duff@adacore.com>

	* sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
	to the Comes_From_Source check, to deal properly with the case
	of indirect inheritance of "=".

2011-12-05  Thomas Quinot  <quinot@adacore.com>

	PR ada/51307
	* s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
	not a macro.

2011-12-05  Thomas Quinot  <quinot@adacore.com>

	* par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
	information in SCOs.

From-SVN: r182004
parent 9b554be9
2011-12-05 Bob Duff <duff@adacore.com>
* sem_ch3.adb (Derive_Progenitor_Subprograms): Add Ultimate_Alias
to the Comes_From_Source check, to deal properly with the case
of indirect inheritance of "=".
2011-12-05 Thomas Quinot <quinot@adacore.com>
PR ada/51307
* s-oscons-tmplt.c: On HP-UX, CLOCK_REALTIME is an enum literal,
not a macro.
2011-12-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Generate dominance
information in SCOs.
2011-12-02 Eric Botcazou <ebotcazou@adacore.com> 2011-12-02 Eric Botcazou <ebotcazou@adacore.com>
Thomas Quinot <quinot@adacore.com> Thomas Quinot <quinot@adacore.com>
......
...@@ -266,18 +266,13 @@ begin ...@@ -266,18 +266,13 @@ begin
Pid : Pragma_Id; Pid : Pragma_Id;
begin begin
-- If continuation, reset Last indication in last entry Key := 'S';
-- stored for previous CS or cs line, and start with key
-- set to s for continuations. -- If continuation, reset Last indication in last entry stored
-- for previous CS or cs line.
if C = 's' then if C = 's' then
SCO_Table.Table (SCO_Table.Last).Last := False; SCO_Table.Table (SCO_Table.Last).Last := False;
Key := 's';
-- CS case (first line, so start with key set to S)
else
Key := 'S';
end if; end if;
-- Initialize to scan items on one line -- Initialize to scan items on one line
...@@ -287,15 +282,25 @@ begin ...@@ -287,15 +282,25 @@ begin
-- Loop through items on one line -- Loop through items on one line
loop loop
Pid := Unknown_Pragma;
Typ := Nextc;
case Typ is
when '>' =>
-- A dominance marker may be present only at an entry
-- point.
pragma Assert (Key = 'S');
Key := '>';
Typ := Nextc; Typ := Nextc;
if Typ in '1' .. '9' then when '1' .. '9' =>
Typ := ' '; Typ := ' ';
else
when others =>
Skipc; Skipc;
if Typ = 'P' then if Typ = 'P' then
Pid := Unknown_Pragma;
if Nextc not in '1' .. '9' then if Nextc not in '1' .. '9' then
N := 1; N := 1;
loop loop
...@@ -317,9 +322,14 @@ begin ...@@ -317,9 +322,14 @@ begin
end; end;
end if; end if;
end if; end if;
end if; end case;
if Key = '>' and then Typ /= 'E' then
Get_Source_Location (Loc1);
Loc2 := No_Source_Location;
else
Get_Source_Location_Range (Loc1, Loc2); Get_Source_Location_Range (Loc1, Loc2);
end if;
SCO_Table.Append SCO_Table.Append
((C1 => Key, ((C1 => Key,
...@@ -330,8 +340,11 @@ begin ...@@ -330,8 +340,11 @@ begin
Pragma_Sloc => No_Location, Pragma_Sloc => No_Location,
Pragma_Name => Pid)); Pragma_Name => Pid));
if Key = '>' then
Key := 'S';
end if;
exit when At_EOL; exit when At_EOL;
Key := 's';
end loop; end loop;
end; end;
......
...@@ -128,10 +128,24 @@ package body Par_SCO is ...@@ -128,10 +128,24 @@ package body Par_SCO is
Pragma_Name : Pragma_Id := Unknown_Pragma); Pragma_Name : Pragma_Id := Unknown_Pragma);
-- Append an entry to SCO_Table with fields set as per arguments -- Append an entry to SCO_Table with fields set as per arguments
procedure Traverse_Declarations_Or_Statements (L : List_Id); type Dominant_Info is record
K : Character;
-- F/T/S/E for a valid dominance marker, or ' ' for no dominant
N : Node_Id;
-- Node providing the sloc(s) for the dominance marker
end record;
No_Dominant : constant Dominant_Info := (' ', Empty);
procedure Traverse_Declarations_Or_Statements
(L : List_Id;
D : Dominant_Info := No_Dominant);
procedure Traverse_Generic_Instantiation (N : Node_Id); procedure Traverse_Generic_Instantiation (N : Node_Id);
procedure Traverse_Generic_Package_Declaration (N : Node_Id); procedure Traverse_Generic_Package_Declaration (N : Node_Id);
procedure Traverse_Handled_Statement_Sequence (N : Node_Id); procedure Traverse_Handled_Statement_Sequence
(N : Node_Id;
D : Dominant_Info := No_Dominant);
procedure Traverse_Package_Body (N : Node_Id); procedure Traverse_Package_Body (N : Node_Id);
procedure Traverse_Package_Declaration (N : Node_Id); procedure Traverse_Package_Declaration (N : Node_Id);
procedure Traverse_Protected_Body (N : Node_Id); procedure Traverse_Protected_Body (N : Node_Id);
...@@ -763,7 +777,7 @@ package body Par_SCO is ...@@ -763,7 +777,7 @@ package body Par_SCO is
declare declare
T : SCO_Table_Entry renames SCO_Table.Table (Index); T : SCO_Table_Entry renames SCO_Table.Table (Index);
begin begin
pragma Assert (T.C1 = 'S' or else T.C1 = 's'); pragma Assert (T.C1 = 'S');
return T.C2 = 'p'; return T.C2 = 'p';
end; end;
...@@ -899,7 +913,7 @@ package body Par_SCO is ...@@ -899,7 +913,7 @@ package body Par_SCO is
-- Called multiple times for the same sloc (need to allow for -- Called multiple times for the same sloc (need to allow for
-- C2 = 'P') ??? -- C2 = 'P') ???
pragma Assert ((T.C1 = 'S' or else T.C1 = 's') pragma Assert (T.C1 = 'S'
and then and then
(T.C2 = 'p' or else T.C2 = 'P')); (T.C2 = 'p' or else T.C2 = 'P'));
T.C2 := 'P'; T.C2 := 'P';
...@@ -1018,7 +1032,16 @@ package body Par_SCO is ...@@ -1018,7 +1032,16 @@ package body Par_SCO is
-- ensure that decisions are output after the CS line for the statements -- ensure that decisions are output after the CS line for the statements
-- in which the decisions occur. -- in which the decisions occur.
procedure Traverse_Declarations_Or_Statements (L : List_Id) is procedure Traverse_Declarations_Or_Statements
(L : List_Id;
D : Dominant_Info := No_Dominant)
is
Current_Dominant : Dominant_Info := D;
-- Dominance information for the current basic block
Current_Condition : Node_Id;
-- Last tested condition in current IF statement
N : Node_Id; N : Node_Id;
Dummy : Source_Ptr; Dummy : Source_Ptr;
...@@ -1041,15 +1064,8 @@ package body Par_SCO is ...@@ -1041,15 +1064,8 @@ package body Par_SCO is
-- the range from the CASE token to the last token of the expression. -- the range from the CASE token to the last token of the expression.
procedure Set_Statement_Entry; procedure Set_Statement_Entry;
-- If Start is No_Location, does nothing, otherwise outputs a SCO_Table -- Output CS entries for all statements saved in table SC, and end the
-- statement entry for the range Start-Stop and then sets both Start -- current CS sequence.
-- and Stop to No_Location.
-- What are Start and Stop??? This comment seems completely unrelated
-- to the implementation!???
-- Unconditionally sets Term to True. What is Term???
-- This is called when we find a statement or declaration that generates
-- its own table entry, so that we must end the current statement
-- sequence.
procedure Process_Decisions_Defer (N : Node_Id; T : Character); procedure Process_Decisions_Defer (N : Node_Id; T : Character);
pragma Inline (Process_Decisions_Defer); pragma Inline (Process_Decisions_Defer);
...@@ -1067,7 +1083,6 @@ package body Par_SCO is ...@@ -1067,7 +1083,6 @@ package body Par_SCO is
------------------------- -------------------------
procedure Set_Statement_Entry is procedure Set_Statement_Entry is
C1 : Character;
SC_Last : constant Int := SC.Last; SC_Last : constant Int := SC.Last;
SD_Last : constant Int := SD.Last; SD_Last : constant Int := SD.Last;
...@@ -1076,9 +1091,25 @@ package body Par_SCO is ...@@ -1076,9 +1091,25 @@ package body Par_SCO is
for J in SC_First .. SC_Last loop for J in SC_First .. SC_Last loop
if J = SC_First then if J = SC_First then
C1 := 'S';
else if Current_Dominant /= No_Dominant then
C1 := 's'; declare
From, To : Source_Ptr;
begin
Sloc_Range (Current_Dominant.N, From, To);
if Current_Dominant.K /= 'E' then
To := No_Location;
end if;
Set_Table_Entry
(C1 => '>',
C2 => Current_Dominant.K,
From => From,
To => To,
Last => False,
Pragma_Sloc => No_Location,
Pragma_Name => Unknown_Pragma);
end;
end if;
end if; end if;
declare declare
...@@ -1102,7 +1133,7 @@ package body Par_SCO is ...@@ -1102,7 +1133,7 @@ package body Par_SCO is
end if; end if;
Set_Table_Entry Set_Table_Entry
(C1 => C1, (C1 => 'S',
C2 => SCE.Typ, C2 => SCE.Typ,
From => SCE.From, From => SCE.From,
To => SCE.To, To => SCE.To,
...@@ -1112,6 +1143,13 @@ package body Par_SCO is ...@@ -1112,6 +1143,13 @@ package body Par_SCO is
end; end;
end loop; end loop;
-- Last statement of basic block, if present, becomes new current
-- dominant.
if SC_Last >= SC_First then
Current_Dominant := ('S', SC.Table (SC_Last).N);
end if;
-- Clear out used section of SC table -- Clear out used section of SC table
SC.Set_Last (SC_First - 1); SC.Set_Last (SC_First - 1);
...@@ -1261,6 +1299,7 @@ package body Par_SCO is ...@@ -1261,6 +1299,7 @@ package body Par_SCO is
Extend_Statement_Sequence (N, ' '); Extend_Statement_Sequence (N, ' ');
Process_Decisions_Defer (Condition (N), 'E'); Process_Decisions_Defer (Condition (N), 'E');
Set_Statement_Entry; Set_Statement_Entry;
Current_Dominant := No_Dominant;
-- Label, which breaks the current statement sequence, but the -- Label, which breaks the current statement sequence, but the
-- label itself is not included in the next statement sequence, -- label itself is not included in the next statement sequence,
...@@ -1268,26 +1307,33 @@ package body Par_SCO is ...@@ -1268,26 +1307,33 @@ package body Par_SCO is
when N_Label => when N_Label =>
Set_Statement_Entry; Set_Statement_Entry;
Current_Dominant := No_Dominant;
-- Block statement, which breaks the current statement sequence -- Block statement, which breaks the current statement sequence
when N_Block_Statement => when N_Block_Statement =>
Set_Statement_Entry; Set_Statement_Entry;
Traverse_Declarations_Or_Statements (Declarations (N)); Traverse_Declarations_Or_Statements
(L => Declarations (N),
D => Current_Dominant);
Traverse_Handled_Statement_Sequence Traverse_Handled_Statement_Sequence
(Handled_Statement_Sequence (N)); (N => Handled_Statement_Sequence (N),
D => Current_Dominant);
-- If statement, which breaks the current statement sequence, -- If statement, which breaks the current statement sequence,
-- but we include the condition in the current sequence. -- but we include the condition in the current sequence.
when N_If_Statement => when N_If_Statement =>
Extend_Statement_Sequence (N, Condition (N), 'I'); Current_Condition := Condition (N);
Process_Decisions_Defer (Condition (N), 'I'); Extend_Statement_Sequence (N, Current_Condition, 'I');
Process_Decisions_Defer (Current_Condition, 'I');
Set_Statement_Entry; Set_Statement_Entry;
-- Now we traverse the statements in the THEN part -- Now we traverse the statements in the THEN part
Traverse_Declarations_Or_Statements (Then_Statements (N)); Traverse_Declarations_Or_Statements
(L => Then_Statements (N),
D => ('T', Current_Condition));
-- Loop through ELSIF parts if present -- Loop through ELSIF parts if present
...@@ -1302,15 +1348,17 @@ package body Par_SCO is ...@@ -1302,15 +1348,17 @@ package body Par_SCO is
-- construct "ELSIF condition", so that we have -- construct "ELSIF condition", so that we have
-- a statement for the resulting decisions. -- a statement for the resulting decisions.
Current_Condition := Condition (Elif);
Extend_Statement_Sequence Extend_Statement_Sequence
(Elif, Condition (Elif), 'I'); (Elif, Current_Condition, 'I');
Process_Decisions_Defer (Condition (Elif), 'I'); Process_Decisions_Defer (Current_Condition, 'I');
Set_Statement_Entry; Set_Statement_Entry;
-- Traverse the statements in the ELSIF -- Traverse the statements in the ELSIF
Traverse_Declarations_Or_Statements Traverse_Declarations_Or_Statements
(Then_Statements (Elif)); (L => Then_Statements (Elif),
D => ('T', Current_Condition));
Next (Elif); Next (Elif);
end loop; end loop;
end; end;
...@@ -1318,7 +1366,9 @@ package body Par_SCO is ...@@ -1318,7 +1366,9 @@ package body Par_SCO is
-- Finally traverse the ELSE statements if present -- Finally traverse the ELSE statements if present
Traverse_Declarations_Or_Statements (Else_Statements (N)); Traverse_Declarations_Or_Statements
(L => Else_Statements (N),
D => ('F', Current_Condition));
-- Case statement, which breaks the current statement sequence, -- Case statement, which breaks the current statement sequence,
-- but we include the expression in the current sequence. -- but we include the expression in the current sequence.
...@@ -1328,14 +1378,17 @@ package body Par_SCO is ...@@ -1328,14 +1378,17 @@ package body Par_SCO is
Process_Decisions_Defer (Expression (N), 'X'); Process_Decisions_Defer (Expression (N), 'X');
Set_Statement_Entry; Set_Statement_Entry;
-- Process case branches -- Process case branches, all of which are dominated by the
-- CASE expression.
declare declare
Alt : Node_Id; Alt : Node_Id;
begin begin
Alt := First (Alternatives (N)); Alt := First (Alternatives (N));
while Present (Alt) loop while Present (Alt) loop
Traverse_Declarations_Or_Statements (Statements (Alt)); Traverse_Declarations_Or_Statements
(L => Statements (Alt),
D => ('S', Expression (N)));
Next (Alt); Next (Alt);
end loop; end loop;
end; end;
...@@ -1348,6 +1401,7 @@ package body Par_SCO is ...@@ -1348,6 +1401,7 @@ package body Par_SCO is
N_Raise_Statement => N_Raise_Statement =>
Extend_Statement_Sequence (N, ' '); Extend_Statement_Sequence (N, ' ');
Set_Statement_Entry; Set_Statement_Entry;
Current_Dominant := No_Dominant;
-- Simple return statement. which is an exit point, but we -- Simple return statement. which is an exit point, but we
-- have to process the return expression for decisions. -- have to process the return expression for decisions.
...@@ -1356,6 +1410,7 @@ package body Par_SCO is ...@@ -1356,6 +1410,7 @@ package body Par_SCO is
Extend_Statement_Sequence (N, ' '); Extend_Statement_Sequence (N, ' ');
Process_Decisions_Defer (Expression (N), 'X'); Process_Decisions_Defer (Expression (N), 'X');
Set_Statement_Entry; Set_Statement_Entry;
Current_Dominant := No_Dominant;
-- Extended return statement -- Extended return statement
...@@ -1367,7 +1422,10 @@ package body Par_SCO is ...@@ -1367,7 +1422,10 @@ package body Par_SCO is
Set_Statement_Entry; Set_Statement_Entry;
Traverse_Handled_Statement_Sequence Traverse_Handled_Statement_Sequence
(Handled_Statement_Sequence (N)); (N => Handled_Statement_Sequence (N),
D => Current_Dominant);
Current_Dominant := No_Dominant;
-- Loop ends the current statement sequence, but we include -- Loop ends the current statement sequence, but we include
-- the iteration scheme if present in the current sequence. -- the iteration scheme if present in the current sequence.
...@@ -1391,6 +1449,10 @@ package body Par_SCO is ...@@ -1391,6 +1449,10 @@ package body Par_SCO is
Extend_Statement_Sequence (N, ISC, 'W'); Extend_Statement_Sequence (N, ISC, 'W');
Process_Decisions_Defer (Condition (ISC), 'W'); Process_Decisions_Defer (Condition (ISC), 'W');
-- Set more specific dominant for inner statements
Current_Dominant := ('T', Condition (ISC));
-- For statement -- For statement
else else
...@@ -1402,7 +1464,13 @@ package body Par_SCO is ...@@ -1402,7 +1464,13 @@ package body Par_SCO is
end if; end if;
Set_Statement_Entry; Set_Statement_Entry;
Traverse_Declarations_Or_Statements (Statements (N)); Traverse_Declarations_Or_Statements
(L => Statements (N),
D => Current_Dominant);
-- Reset current dominant
Current_Dominant := ('S', N);
-- Pragma -- Pragma
...@@ -1580,7 +1648,10 @@ package body Par_SCO is ...@@ -1580,7 +1648,10 @@ package body Par_SCO is
-- Traverse_Handled_Statement_Sequence -- -- Traverse_Handled_Statement_Sequence --
----------------------------------------- -----------------------------------------
procedure Traverse_Handled_Statement_Sequence (N : Node_Id) is procedure Traverse_Handled_Statement_Sequence
(N : Node_Id;
D : Dominant_Info := No_Dominant)
is
Handler : Node_Id; Handler : Node_Id;
begin begin
...@@ -1589,12 +1660,14 @@ package body Par_SCO is ...@@ -1589,12 +1660,14 @@ package body Par_SCO is
-- which does not come from source, does not get a SCO. -- which does not come from source, does not get a SCO.
if Present (N) and then Comes_From_Source (N) then if Present (N) and then Comes_From_Source (N) then
Traverse_Declarations_Or_Statements (Statements (N)); Traverse_Declarations_Or_Statements (Statements (N), D);
if Present (Exception_Handlers (N)) then if Present (Exception_Handlers (N)) then
Handler := First (Exception_Handlers (N)); Handler := First (Exception_Handlers (N));
while Present (Handler) loop while Present (Handler) loop
Traverse_Declarations_Or_Statements (Statements (Handler)); Traverse_Declarations_Or_Statements
(L => Statements (Handler),
D => ('E', Handler));
Next (Handler); Next (Handler);
end loop; end loop;
end if; end if;
......
...@@ -133,9 +133,9 @@ begin ...@@ -133,9 +133,9 @@ begin
begin begin
case T.C1 is case T.C1 is
-- Statements -- Statements (and dominance markers)
when 'S' => when 'S' | '>' =>
Ctr := 0; Ctr := 0;
Continuation := False; Continuation := False;
loop loop
...@@ -161,9 +161,15 @@ begin ...@@ -161,9 +161,15 @@ begin
Sent : SCO_Table_Entry Sent : SCO_Table_Entry
renames SCO_Table.Table (Start); renames SCO_Table.Table (Start);
begin begin
if Sent.C1 = '>' then
Write_Info_Char (Sent.C1);
end if;
if Sent.C2 /= ' ' then if Sent.C2 /= ' ' then
Write_Info_Char (Sent.C2); Write_Info_Char (Sent.C2);
if Sent.C2 = 'P'
if Sent.C1 = 'S'
and then Sent.C2 = 'P'
and then Sent.Pragma_Name /= Unknown_Pragma and then Sent.Pragma_Name /= Unknown_Pragma
then then
declare declare
...@@ -179,7 +185,15 @@ begin ...@@ -179,7 +185,15 @@ begin
end if; end if;
end if; end if;
-- For dependence markers (except E), output sloc.
-- For >E and all statement entries, output sloc
-- range.
if Sent.C1 = '>' and then Sent.C2 /= 'E' then
Output_Source_Location (Sent.From);
else
Output_Range (Sent); Output_Range (Sent);
end if;
end; end;
-- Increment entry counter (up to 6 entries per line, -- Increment entry counter (up to 6 entries per line,
...@@ -194,19 +208,12 @@ begin ...@@ -194,19 +208,12 @@ begin
<<Next_Statement>> <<Next_Statement>>
exit when SCO_Table.Table (Start).Last; exit when SCO_Table.Table (Start).Last;
Start := Start + 1; Start := Start + 1;
pragma Assert (SCO_Table.Table (Start).C1 = 's');
end loop; end loop;
if Ctr > 0 then if Ctr > 0 then
Write_Info_Terminate; Write_Info_Terminate;
end if; end if;
-- Statement continuations should not occur since they
-- are supposed to have been handled in the loop above.
when 's' =>
raise Program_Error;
-- Decision -- Decision
when 'E' | 'G' | 'I' | 'P' | 'W' | 'X' => when 'E' | 'G' | 'I' | 'P' | 'W' | 'X' =>
......
...@@ -1343,7 +1343,13 @@ CST(Inet_Pton_Linkname, "") ...@@ -1343,7 +1343,13 @@ CST(Inet_Pton_Linkname, "")
*/ */
#ifdef CLOCK_REALTIME /* Note: On HP-UX, CLOCK_REALTIME is an enum, not a macro. */
#if defined(CLOCK_REALTIME) || defined (__hpux__)
# define HAVE_CLOCK_REALTIME
#endif
#ifdef HAVE_CLOCK_REALTIME
CND(CLOCK_REALTIME, "System realtime clock") CND(CLOCK_REALTIME, "System realtime clock")
#endif #endif
...@@ -1377,7 +1383,7 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") ...@@ -1377,7 +1383,7 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock")
# define CLOCK_RT_Ada "CLOCK_MONOTONIC" # define CLOCK_RT_Ada "CLOCK_MONOTONIC"
# define NEED_PTHREAD_CONDATTR_SETCLOCK # define NEED_PTHREAD_CONDATTR_SETCLOCK
#elif defined(CLOCK_REALTIME) #elif defined(HAVE_CLOCK_REALTIME)
/* By default use CLOCK_REALTIME */ /* By default use CLOCK_REALTIME */
# define CLOCK_RT_Ada "CLOCK_REALTIME" # define CLOCK_RT_Ada "CLOCK_REALTIME"
#endif #endif
......
...@@ -135,14 +135,14 @@ package SCOs is ...@@ -135,14 +135,14 @@ package SCOs is
-- any statement with a label (the label itself is not part of the -- any statement with a label (the label itself is not part of the
-- entry point that is recorded). -- entry point that is recorded).
-- Each entry point must appear as the first entry on a CS line. -- Each entry point must appear as the first statement entry on a CS
-- The idea is that if any simple statement on a CS line is known to have -- line. Thus, if any simple statement on a CS line is known to have
-- been executed, then all statements that appear before it on the same -- been executed, then all statements that appear before it on the same
-- CS line are certain to also have been executed. -- CS line are certain to also have been executed.
-- The form of a statement line in the ALI file is: -- The form of a statement line in the ALI file is:
-- CS *sloc-range [*sloc-range...] -- CS [dominance] *sloc-range [*sloc-range...]
-- where each sloc-range corresponds to a single statement, and * is -- where each sloc-range corresponds to a single statement, and * is
-- one of: -- one of:
...@@ -165,6 +165,23 @@ package SCOs is ...@@ -165,6 +165,23 @@ package SCOs is
-- and is omitted for all other cases -- and is omitted for all other cases
-- The optional dominance marker is of the form gives additional
-- information as to how the sequence of statements denoted by the CS
-- line can be entered:
-- >F<sloc>
-- sequence is entered only if the decision at <sloc> is False
-- >T<sloc>
-- sequence is entered only if the decision at <sloc> is True
-- >S<sloc>
-- sequence is entered only if the statement at <sloc> has been
-- executed
-- >E<sloc-range>
-- sequence is the sequence of statements for a exception_handler
-- with the given sloc range
-- Note: up to 6 entries can appear on a single CS line. If more than 6 -- Note: up to 6 entries can appear on a single CS line. If more than 6
-- entries appear in one logical statement sequence, continuation lines -- entries appear in one logical statement sequence, continuation lines
-- are marked by Cs and appear immediately after the CS line. -- are marked by Cs and appear immediately after the CS line.
...@@ -381,7 +398,7 @@ package SCOs is ...@@ -381,7 +398,7 @@ package SCOs is
-- The SCO_Table_Entry values appear as follows: -- The SCO_Table_Entry values appear as follows:
-- Statements -- Statements
-- C1 = 'S' for entry point, 's' otherwise -- C1 = 'S'
-- C2 = statement type code to appear on CS line (or ' ' if none) -- C2 = statement type code to appear on CS line (or ' ' if none)
-- From = starting source location -- From = starting source location
-- To = ending source location -- To = ending source location
...@@ -400,6 +417,15 @@ package SCOs is ...@@ -400,6 +417,15 @@ package SCOs is
-- Set_SCO_Pragma_Enabled changes C2 to 'P' to cause the entry to be -- Set_SCO_Pragma_Enabled changes C2 to 'P' to cause the entry to be
-- emitted in Put_SCOs. -- emitted in Put_SCOs.
-- Dominance marker
-- C1 = '>'
-- C2 = 'F'/'T'/'S'/'E'
-- From = Decision/statement sloc ('F'/'T'/'S'),
-- handler first sloc ('E')
-- To = No_Source_Location ('F'/'T'/'S'), handler last sloc ('E')
-- Note: A dominance marker is always followed by a statement entry.
-- Decision (EXIT/entry guard/IF/WHILE) -- Decision (EXIT/entry guard/IF/WHILE)
-- C1 = 'E'/'G'/'I'/'W' (for EXIT/entry Guard/IF/WHILE) -- C1 = 'E'/'G'/'I'/'W' (for EXIT/entry Guard/IF/WHILE)
-- C2 = ' ' -- C2 = ' '
......
...@@ -12820,14 +12820,15 @@ package body Sem_Ch3 is ...@@ -12820,14 +12820,15 @@ package body Sem_Ch3 is
Iface_Subp := Node (Prim_Elmt); Iface_Subp := Node (Prim_Elmt);
-- Exclude derivation of predefined primitives except those -- Exclude derivation of predefined primitives except those
-- that come from source. Required to catch declarations of -- that come from source, or are inherited from one that comes
-- equality operators of interfaces. For example: -- from source. Required to catch declarations of equality
-- operators of interfaces. For example:
-- type Iface is interface; -- type Iface is interface;
-- function "=" (Left, Right : Iface) return Boolean; -- function "=" (Left, Right : Iface) return Boolean;
if not Is_Predefined_Dispatching_Operation (Iface_Subp) if not Is_Predefined_Dispatching_Operation (Iface_Subp)
or else Comes_From_Source (Iface_Subp) or else Comes_From_Source (Ultimate_Alias (Iface_Subp))
then then
E := Find_Primitive_Covering_Interface E := Find_Primitive_Covering_Interface
(Tagged_Type => Tagged_Type, (Tagged_Type => Tagged_Type,
......
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