aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-11-04 15:09:05 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2011-11-04 15:09:05 +0100
commit1adaea169e06627aa8482d1afebf178a3ca67edf (patch)
tree9a92388832fcd63df076879c26d8b5b64096e21f
parent4c9fe6c7494e31402c1c3ae4565aa03f70144258 (diff)
downloadgcc-1adaea169e06627aa8482d1afebf178a3ca67edf.zip
gcc-1adaea169e06627aa8482d1afebf178a3ca67edf.tar.gz
gcc-1adaea169e06627aa8482d1afebf178a3ca67edf.tar.bz2
[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
-rw-r--r--gcc/ada/ChangeLog42
-rw-r--r--gcc/ada/atree.ads2
-rw-r--r--gcc/ada/errout.adb2
-rw-r--r--gcc/ada/exp_ch11.adb12
-rw-r--r--gcc/ada/exp_ch6.adb6
-rw-r--r--gcc/ada/exp_util.adb9
-rw-r--r--gcc/ada/s-tassta.adb2
-rw-r--r--gcc/ada/sem_ch6.adb11
-rw-r--r--gcc/ada/sem_prag.adb3
-rw-r--r--gcc/ada/sinput.adb3
-rw-r--r--gcc/ada/sprint.adb10
11 files changed, 89 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7924c40..fba1980 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,47 @@
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>
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index 6bb9ddd..bbb6e3e 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -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
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index 8848289..5993132 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -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 #",
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index dca021f..b2bf98c 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -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
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 993fa40..d609931 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -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
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index bbad712..2045201 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -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));
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb
index 27c847d..410cc8c 100644
--- a/gcc/ada/s-tassta.adb
+++ b/gcc/ada/s-tassta.adb
@@ -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);
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 3dbf782..5d30faa4 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -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))
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index f8562ba..397c733 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -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);
diff --git a/gcc/ada/sinput.adb b/gcc/ada/sinput.adb
index 6d0be93..175af07 100644
--- a/gcc/ada/sinput.adb
+++ b/gcc/ada/sinput.adb
@@ -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.
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 3c45d78..674c9db 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -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;