Commit 1adaea16 by Arnaud Charlet

[multiple changes]

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
	Avoid junk semicolon after argument of machine code Asm operand.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
	CodePeer mode or if restriction No_Exception_Handlers is present.
	* exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
	nodes in CodePeer mode or if restriction No_Exception_Handlers
	is present.

2011-11-04  Robert Dewar  <dewar@adacore.com>

	* s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Specification): The
	specification is legal if it is a function that returns an
	abstract type, if it comes from an attribute renaming of a stream
	attribute of an abstract type.

2011-11-04  Gary Dismukes  <dismukes@adacore.com>

	* exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
	components, check whether recursively check whether the prefix
	denotes an unaligned object.

2011-11-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Debug): The argument of
	the pragma is legal if it is an expanded name that denotes a
	procedure that be can called without parameters.

2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat_ugn.texi (Performance Considerations) <Vectorization
	of loops>: New sub-section.  <Other Optimization Switches>:
	Minor tweak.

From-SVN: r180955
parent 4c9fe6c7
2011-11-04 Robert Dewar <dewar@adacore.com>
* sprint.adb (Sprint_Node_Actual, case Qualified_Expression):
Avoid junk semicolon after argument of machine code Asm operand.
2011-11-04 Robert Dewar <dewar@adacore.com>
* exp_ch11.adb (Generate_Push_Pop): Inhibit push/pop nodes in
CodePeer mode or if restriction No_Exception_Handlers is present.
* exp_ch6.adb (Expand_N_Subprogram_Body): (Inhibit push/pop
nodes in CodePeer mode or if restriction No_Exception_Handlers
is present.
2011-11-04 Robert Dewar <dewar@adacore.com>
* s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting.
2011-11-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Specification): The
specification is legal if it is a function that returns an
abstract type, if it comes from an attribute renaming of a stream
attribute of an abstract type.
2011-11-04 Gary Dismukes <dismukes@adacore.com>
* exp_util.adb (Is_Possibly_Unaligned_Object): In case of indexed
components, check whether recursively check whether the prefix
denotes an unaligned object.
2011-11-04 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Debug): The argument of
the pragma is legal if it is an expanded name that denotes a
procedure that be can called without parameters.
2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
* gnat_ugn.texi (Performance Considerations) <Vectorization
of loops>: New sub-section. <Other Optimization Switches>:
Minor tweak.
2011-11-04 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Minor reformatting.
2011-11-04 Matthew Heaney <heaney@adacore.com>
......
......@@ -160,7 +160,7 @@ package Atree is
-- Flag10
-- Flag11 Note that Flag1-2 are missing from this list. For
-- Flag12 historical reasons, these flag names are unused.
-- Flag13
-- Flag13 What about Flag3???
-- Flag14
-- Flag15
-- Flag16
......
......@@ -439,7 +439,6 @@ package body Errout is
Error_Msg_Internal
("?in inlined body #",
Actual_Error_Loc, Flag_Location, Msg_Cont_Status);
else
Error_Msg_Internal
("error in inlined body #",
......@@ -453,7 +452,6 @@ package body Errout is
Error_Msg_Internal
("?in instantiation #",
Actual_Error_Loc, Flag_Location, Msg_Cont_Status);
else
Error_Msg_Internal
("instantiation error #",
......
......@@ -334,7 +334,7 @@ package body Exp_Ch11 is
-- raise statements into gotos, e.g. all N_Raise_xxx_Error nodes are
-- left unchanged and passed to the back end.
-- Instead, the front end generates two nodes
-- Instead, the front end generates three nodes
-- N_Push_Constraint_Error_Label
-- N_Push_Program_Error_Label
......@@ -356,6 +356,10 @@ package body Exp_Ch11 is
-- field in the Push node will be empty signifying that for this region
-- of code, no optimization is possible.
-- These Push/Pop nodes are inhibited if No_Exception_Handlers is set
-- since they are useless in this case, and in CodePeer mode, where
-- they serve no purpose and can intefere with the analysis.
-- The back end must maintain three stacks, one for each exception case,
-- the Push node pushes an entry onto the corresponding stack, and Pop
-- node pops off the entry. Then instead of calling Rcheck_nn, if the
......@@ -503,6 +507,12 @@ package body Exp_Ch11 is
procedure Generate_Push_Pop (H : Node_Id) is
begin
if Restriction_Active (No_Exception_Handlers)
or else CodePeer_Mode
then
return;
end if;
if Exc_Locally_Handled then
return;
else
......
......@@ -5679,10 +5679,14 @@ package body Exp_Ch6 is
end if;
-- If local-exception-to-goto optimization active, insert dummy push
-- statements at start, and dummy pop statements at end.
-- statements at start, and dummy pop statements at end, but inhibit
-- this if we have No_Exception_Handlers, since they are useless and
-- intefere with analysis, e.g. by codepeer.
if (Debug_Flag_Dot_G
or else Restriction_Active (No_Exception_Propagation))
and then not Restriction_Active (No_Exception_Handlers)
and then not CodePeer_Mode
and then Is_Non_Empty_List (L)
then
declare
......
......@@ -4273,9 +4273,14 @@ package body Exp_Util is
return True;
end if;
-- Case of component reference
-- Case of indexed component reference: test whether prefix is unaligned
if Nkind (N) = N_Selected_Component then
if Nkind (N) = N_Indexed_Component then
return Is_Possibly_Unaligned_Object (Prefix (N));
-- Case of selected component reference
elsif Nkind (N) = N_Selected_Component then
declare
P : constant Node_Id := Prefix (N);
C : constant Entity_Id := Entity (Selector_Name (N));
......
......@@ -1156,7 +1156,7 @@ package body System.Tasking.Stages is
Stack_Guard (Self_ID, True);
-- Initialize low-level TCB components, that cannot be initialized by
-- the creator. Enter_Task sets Self_ID.LL.Thread
-- the creator. Enter_Task sets Self_ID.LL.Thread.
Enter_Task (Self_ID);
......
......@@ -3415,14 +3415,17 @@ package body Sem_Ch6 is
-- Ada 2005 (AI-251): If the return type is abstract, verify that
-- the subprogram is abstract also. This does not apply to renaming
-- declarations, where abstractness is inherited.
-- declarations, where abstractness is inherited, and to subprogram
-- bodies generated for stream operations, which become renamings as
-- bodies.
-- In case of primitives associated with abstract interface types
-- the check is applied later (see Analyze_Subprogram_Declaration).
if not Nkind_In (Parent (N), N_Subprogram_Renaming_Declaration,
N_Abstract_Subprogram_Declaration,
N_Formal_Abstract_Subprogram_Declaration)
if not Nkind_In (Original_Node (Parent (N)),
N_Subprogram_Renaming_Declaration,
N_Abstract_Subprogram_Declaration,
N_Formal_Abstract_Subprogram_Declaration)
then
if Is_Abstract_Type (Etype (Designator))
and then not Is_Interface (Etype (Designator))
......
......@@ -7902,10 +7902,13 @@ package body Sem_Prag is
N_Indexed_Component,
N_Function_Call,
N_Identifier,
N_Expanded_Name,
N_Selected_Component)
then
-- If this pragma Debug comes from source, its argument was
-- parsed as a name form (which is syntactically identical).
-- In a generic context a parameterless call will be left as
-- an expanded name (if global) or selected_component if local.
-- Change it to a procedure call statement now.
Change_Name_To_Procedure_Call_Statement (Call);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -51,6 +51,7 @@ package body Sinput is
-- Make control characters visible
First_Time_Around : Boolean := True;
-- This needs a comment ???
-- Routines to support conversion between types Lines_Table_Ptr,
-- Logical_Lines_Table_Ptr and System.Address.
......
......@@ -2694,9 +2694,19 @@ package body Sprint is
if Paren_Count (Expression (Node)) /= 0 then
Sprint_Node (Expression (Node));
else
Write_Char ('(');
Sprint_Node (Expression (Node));
-- Odd case, for the qualified expressions used in machine
-- code the argument may be a procedure call, resulting in
-- a junk semicolon before the right parent, get rid of it.
Write_Erase_Char (';');
-- Now we can add the terminating right paren
Write_Char (')');
end if;
......
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