From: charlet Date: Mon, 5 Sep 2011 13:53:59 +0000 (+0000) Subject: 2011-09-05 Ed Schonberg X-Git-Tag: upstream/4.9.2~17925 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5de363e7538b05e434d77d4bfb18305ed4309591;p=platform%2Fupstream%2Flinaro-gcc.git 2011-09-05 Ed Schonberg * exp_aggr.adb (Replace_Type): If the target of the assignment is a selected component and the right-hand side is a self-referential access, the proper prefix of the rewritten attribute is a copy of the left-hand side, not of its prefix. 2011-09-05 Robert Dewar * sem_ch5.adb: Minor reformatting. * sem_ch3.adb: Minor code clean up. 2011-09-05 Jose Ruiz * exp_ch9.adb (Make_Initialize_Protection): The fact that restriction No_Dynamic_Attachment is in effect or not should not influence the default priority associated to a protected object. With this change, when the restriction is in effect (as is the case for the Ravenscar profile) the default priority of a protected object with an interrupt handler is in the range of interrupt priorities (Default_Interrupt_Priority) as required by D.3(10). 2011-09-05 Arnaud Charlet * a-iteint.ads: Fix header. 2011-09-05 Vincent Celier * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends with a directory separator to avoid output such as: "/path/to/objauto.cgpr" has been deleted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178542 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 056672d..fc96642 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,36 @@ +2011-09-05 Ed Schonberg + + * exp_aggr.adb (Replace_Type): If the target of the assignment is + a selected component and the right-hand side is a self-referential + access, the proper prefix of the rewritten attribute is a copy + of the left-hand side, not of its prefix. + +2011-09-05 Robert Dewar + + * sem_ch5.adb: Minor reformatting. + * sem_ch3.adb: Minor code clean up. + +2011-09-05 Jose Ruiz + + * exp_ch9.adb (Make_Initialize_Protection): The fact that + restriction No_Dynamic_Attachment is in effect or not should + not influence the default priority associated to a protected + object. With this change, when the restriction is in effect (as + is the case for the Ravenscar profile) the default priority of + a protected object with an interrupt handler is in the range of + interrupt priorities (Default_Interrupt_Priority) as required + by D.3(10). + +2011-09-05 Arnaud Charlet + + * a-iteint.ads: Fix header. + +2011-09-05 Vincent Celier + + * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends + with a directory separator to avoid output such as: + "/path/to/objauto.cgpr" has been deleted. + 2011-09-05 Robert Dewar * sem_ch3.adb: Minor reformatting. diff --git a/gcc/ada/a-iteint.ads b/gcc/ada/a-iteint.ads index 192bdcb..f0e1659 100644 --- a/gcc/ada/a-iteint.ads +++ b/gcc/ada/a-iteint.ads @@ -6,27 +6,10 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2011, Free Software Foundation, Inc. -- --- -- -- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- 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- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- +-- GNAT. In accordance with the copyright of that document, you can freely -- +-- copy and modify this specification, provided that if you redistribute a -- +-- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ @@ -34,6 +17,7 @@ generic type Cursor; with function Has_Element (Position : Cursor) return Boolean; pragma Unreferenced (Has_Element); + package Ada.Iterator_Interfaces is pragma Pure; diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 31b0c61..74a7edf 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -2168,7 +2168,7 @@ package body Exp_Aggr is Rewrite (Expr, Make_Attribute_Reference (Loc, Attribute_Name => Name_Unrestricted_Access, - Prefix => New_Copy_Tree (Prefix (Lhs)))); + Prefix => New_Copy_Tree (Lhs))); Set_Analyzed (Parent (Expr), False); else diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 542ae61..bbdb56b 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -12503,8 +12503,8 @@ package body Exp_Ch9 is -- When no priority is specified but an xx_Handler pragma is, we default -- to System.Interrupts.Default_Interrupt_Priority, see D.3(10). - elsif (Has_Attach_Handler (Ptyp) or else Has_Interrupt_Handler (Ptyp)) - and then not Restriction_Active (No_Dynamic_Attachment) + elsif Has_Attach_Handler (Ptyp) + or else Has_Interrupt_Handler (Ptyp) then Append_To (Args, New_Reference_To (RTE (RE_Default_Interrupt_Priority), Loc)); diff --git a/gcc/ada/prj-conf.adb b/gcc/ada/prj-conf.adb index 8b86c46..1514107 100644 --- a/gcc/ada/prj-conf.adb +++ b/gcc/ada/prj-conf.adb @@ -959,6 +959,13 @@ package body Prj.Conf is end if; end loop; + -- Make sure that Obj_Dir ends with a directory separator + + if Name_Buffer (Name_Len) /= Directory_Separator then + Name_Len := Name_Len + 1; + Name_Buffer (Name_Len) := Directory_Separator; + end if; + declare Obj_Dir : constant String := Name_Buffer (1 .. Name_Len); Config_Switches : Argument_List_Access; diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index b5ee8fe..8a36be7 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3270,11 +3270,7 @@ package body Sem_Ch3 is -- In SPARK, a declaration of unconstrained type is allowed -- only for constants of type string. - -- Why do we need to test Original_Node here ??? - - if Is_String_Type (T) - and then not Constant_Present (Original_Node (N)) - then + if Is_String_Type (T) and then not Constant_Present (N) then Check_SPARK_Restriction ("declaration of object of unconstrained type not allowed", N); diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 36b9e31..d22f6ce 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -2337,10 +2337,14 @@ package body Sem_Ch5 is if Of_Present (N) then Set_Etype (Def_Id, Component_Type (Typ)); + -- Here we have a missing Range attribute + else Error_Msg_N ("missing Range attribute in iteration over an array", N); + -- In Ada 2012 mode, this may be an attempt at an iterator + if Ada_Version >= Ada_2012 then Error_Msg_NE ("\if& is meant to designate an element of the array, use OF",