From: Arnaud Charlet Date: Wed, 18 Nov 2015 10:23:05 +0000 (+0100) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d4c4fde0e89b87d4b449504e4790e1f49262772;p=gcc.git [multiple changes] 2015-11-18 Arnaud Charlet * switch-c.adb (Scan_Front_End_Switches): Add a check requiring -gnatc with -gnateg. 2015-11-18 Ed Schonberg * sem_ch7.adb (Uninstall_Declarations): Before swapping private and full views, ensure that the potential use visbility of the two views is consistent. 2015-11-18 Doug Rupp * s-parame-vxworks.adb: Increase default stack size for targets using stack limit checking. 2015-11-18 Jose Ruiz * a-interr.adb, a-interr.ads (Ada.Interrupts.Get_CPU): Add this function that was added to Ada 2005 returning the processor where interrupt handlers execute. 2015-11-18 Tristan Gingold * exp_ch9.adb (Is_Pure_Barrier): Handle expanded component declaration of a protected definition. From-SVN: r230529 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 19cefb23845..6127fd5dc77 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,30 @@ +2015-11-18 Arnaud Charlet + + * switch-c.adb (Scan_Front_End_Switches): Add a check requiring + -gnatc with -gnateg. + +2015-11-18 Ed Schonberg + + * sem_ch7.adb (Uninstall_Declarations): Before swapping private + and full views, ensure that the potential use visbility of the + two views is consistent. + +2015-11-18 Doug Rupp + + * s-parame-vxworks.adb: Increase default stack size for targets + using stack limit checking. + +2015-11-18 Jose Ruiz + + * a-interr.adb, a-interr.ads (Ada.Interrupts.Get_CPU): Add this + function that was added to Ada 2005 returning the processor where + interrupt handlers execute. + +2015-11-18 Tristan Gingold + + * exp_ch9.adb (Is_Pure_Barrier): Handle expanded component + declaration of a protected definition. + 2015-11-18 Ed Falis * s-soflin.adb, s-stchop-vxworks.adb: Code clean ups. diff --git a/gcc/ada/a-interr.adb b/gcc/ada/a-interr.adb index cd8ca0de21c..f01ac1ae49d 100644 --- a/gcc/ada/a-interr.adb +++ b/gcc/ada/a-interr.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2010, AdaCore -- +-- Copyright (C) 1995-2015, AdaCore -- -- -- -- 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- -- @@ -93,6 +93,22 @@ package body Ada.Interrupts is Old_Handler := To_Ada (H); end Exchange_Handler; + ------------- + -- Get_CPU -- + ------------- + + function Get_CPU + (Interrupt : Interrupt_ID) return System.Multiprocessors.CPU_Range + is + pragma Unreferenced (Interrupt); + + begin + -- The underlying operating system does not indicate the processor on + -- which the handler for Interrupt is executed. + + return System.Multiprocessors.Not_A_Specific_CPU; + end Get_CPU; + ----------------- -- Is_Attached -- ----------------- diff --git a/gcc/ada/a-interr.ads b/gcc/ada/a-interr.ads index 0ce2ed66d95..309e88e07ac 100644 --- a/gcc/ada/a-interr.ads +++ b/gcc/ada/a-interr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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 -- @@ -34,6 +34,7 @@ ------------------------------------------------------------------------------ with System.Interrupts; +with System.Multiprocessors; with Ada.Task_Identification; package Ada.Interrupts is @@ -81,6 +82,9 @@ package Ada.Interrupts is SPARK_Mode => Off, Global => null; + function Get_CPU + (Interrupt : Interrupt_ID) return System.Multiprocessors.CPU_Range; + private pragma Inline (Is_Reserved); pragma Inline (Is_Attached); @@ -88,4 +92,5 @@ private pragma Inline (Attach_Handler); pragma Inline (Detach_Handler); pragma Inline (Exchange_Handler); + pragma Inline (Get_CPU); end Ada.Interrupts; diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index bd9a2af9551..0c9419e24e4 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -6419,7 +6419,12 @@ package body Exp_Ch9 is E_Enumeration_Literal => return OK; - when E_Variable => + when E_Component | + E_Variable => + + -- A variable in the protected type is expanded as a + -- component. + if Is_Simple_Barrier_Name (N) then return OK; end if; diff --git a/gcc/ada/s-parame-vxworks.adb b/gcc/ada/s-parame-vxworks.adb index 1fe2288da5b..d023c8c5276 100644 --- a/gcc/ada/s-parame-vxworks.adb +++ b/gcc/ada/s-parame-vxworks.adb @@ -57,7 +57,12 @@ package body System.Parameters is pragma Import (C, Default_Stack_Size, "__gl_default_stack_size"); begin if Default_Stack_Size = -1 then - return 20 * 1024; + if Stack_Check_Limits then + return 60 * 1024; + -- Extra stack to allow for 12K exception area. + else + return 20 * 1024; + end if; else return Size_Type (Default_Stack_Size); end if; diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index 229d29dbe3a..7de1c6f924f 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -2675,10 +2675,13 @@ package body Sem_Ch7 is -- If this is a private type with a full view (for example a local -- subtype of a private type declared elsewhere), ensure that the -- full view is also removed from visibility: it may be exposed when - -- swapping views in an instantiation. + -- swapping views in an instantiation. Similarly, ensure that the + -- use-visibility is properly set on both views. if Is_Type (Id) and then Present (Full_View (Id)) then - Set_Is_Immediately_Visible (Full_View (Id), False); + Set_Is_Immediately_Visible (Full_View (Id), False); + Set_Is_Potentially_Use_Visible (Full_View (Id), + Is_Potentially_Use_Visible (Id)); end if; if Is_Tagged_Type (Id) and then Ekind (Id) = E_Record_Type then diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 977d00337f8..4ded20b7f2f 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -579,6 +579,13 @@ package body Switch.C is -- -gnateg (generate C code) when 'g' => + -- Special check, -gnateg must occur after -gnatc + + if Operating_Mode /= Check_Semantics then + Osint.Fail + ("gnateg requires previous occurrence of -gnatc"); + end if; + Generate_C_Code := True; Ptr := Ptr + 1;