From: charlet Date: Fri, 4 Nov 2011 14:09:05 +0000 (+0000) Subject: 2011-11-04 Robert Dewar X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=8f979dbe2d9556128d075c387c353604b2a77bd9;p=pf3gnuchains%2Fgcc-fork.git 2011-11-04 Robert Dewar * sprint.adb (Sprint_Node_Actual, case Qualified_Expression): Avoid junk semicolon after argument of machine code Asm operand. 2011-11-04 Robert Dewar * 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 * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting. 2011-11-04 Ed Schonberg * 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 * 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 * 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 * gnat_ugn.texi (Performance Considerations) : New sub-section. : Minor tweak. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180955 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7924c40afed..fba19804857 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,47 @@ 2011-11-04 Robert Dewar + * sprint.adb (Sprint_Node_Actual, case Qualified_Expression): + Avoid junk semicolon after argument of machine code Asm operand. + +2011-11-04 Robert Dewar + + * 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 + + * s-tassta.adb, atree.ads, errout.adb, sinput.adb: Minor reformatting. + +2011-11-04 Ed Schonberg + + * 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 + + * 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 + + * 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 + + * gnat_ugn.texi (Performance Considerations) : New sub-section. : + Minor tweak. + +2011-11-04 Robert Dewar + * gnat_rm.texi: Minor reformatting. 2011-11-04 Matthew Heaney diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index 6bb9ddde161..bbb6e3e20e0 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 88482898a92..5993132cf81 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 dca021f9237..b2bf98cd1db 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 993fa40c3fa..d6099314092 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 bbad7128a86..2045201a522 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 27c847df6e9..410cc8c0f06 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 3dbf782b60b..5d30faa4944 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 f8562ba8fd6..397c73380a2 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 6d0be93a571..175af07969b 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 3c45d789390..674c9db05ac 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;