Commit 7d4c4fde by Arnaud Charlet

[multiple changes]

2015-11-18  Arnaud Charlet  <charlet@adacore.com>

	* switch-c.adb (Scan_Front_End_Switches): Add a check requiring
	-gnatc with -gnateg.

2015-11-18  Ed Schonberg  <schonberg@adacore.com>

	* 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  <rupp@adacore.com>

	* s-parame-vxworks.adb: Increase default stack size for targets
	using stack limit checking.

2015-11-18  Jose Ruiz  <ruiz@adacore.com>

	* 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  <gingold@adacore.com>

	* exp_ch9.adb (Is_Pure_Barrier): Handle expanded component
	declaration of a protected definition.

From-SVN: r230529
parent 3a2b1457
2015-11-18 Arnaud Charlet <charlet@adacore.com>
* switch-c.adb (Scan_Front_End_Switches): Add a check requiring
-gnatc with -gnateg.
2015-11-18 Ed Schonberg <schonberg@adacore.com>
* 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 <rupp@adacore.com>
* s-parame-vxworks.adb: Increase default stack size for targets
using stack limit checking.
2015-11-18 Jose Ruiz <ruiz@adacore.com>
* 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 <gingold@adacore.com>
* exp_ch9.adb (Is_Pure_Barrier): Handle expanded component
declaration of a protected definition.
2015-11-18 Ed Falis <falis@adacore.com> 2015-11-18 Ed Falis <falis@adacore.com>
* s-soflin.adb, s-stchop-vxworks.adb: Code clean ups. * s-soflin.adb, s-stchop-vxworks.adb: Code clean ups.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1991-1994, Florida State University -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -93,6 +93,22 @@ package body Ada.Interrupts is ...@@ -93,6 +93,22 @@ package body Ada.Interrupts is
Old_Handler := To_Ada (H); Old_Handler := To_Ada (H);
end Exchange_Handler; 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 -- -- Is_Attached --
----------------- -----------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow -- -- GNAT. The copyright notice above, and the license provisions that follow --
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
with System.Interrupts; with System.Interrupts;
with System.Multiprocessors;
with Ada.Task_Identification; with Ada.Task_Identification;
package Ada.Interrupts is package Ada.Interrupts is
...@@ -81,6 +82,9 @@ package Ada.Interrupts is ...@@ -81,6 +82,9 @@ package Ada.Interrupts is
SPARK_Mode => Off, SPARK_Mode => Off,
Global => null; Global => null;
function Get_CPU
(Interrupt : Interrupt_ID) return System.Multiprocessors.CPU_Range;
private private
pragma Inline (Is_Reserved); pragma Inline (Is_Reserved);
pragma Inline (Is_Attached); pragma Inline (Is_Attached);
...@@ -88,4 +92,5 @@ private ...@@ -88,4 +92,5 @@ private
pragma Inline (Attach_Handler); pragma Inline (Attach_Handler);
pragma Inline (Detach_Handler); pragma Inline (Detach_Handler);
pragma Inline (Exchange_Handler); pragma Inline (Exchange_Handler);
pragma Inline (Get_CPU);
end Ada.Interrupts; end Ada.Interrupts;
...@@ -6419,7 +6419,12 @@ package body Exp_Ch9 is ...@@ -6419,7 +6419,12 @@ package body Exp_Ch9 is
E_Enumeration_Literal => E_Enumeration_Literal =>
return OK; 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 if Is_Simple_Barrier_Name (N) then
return OK; return OK;
end if; end if;
......
...@@ -57,7 +57,12 @@ package body System.Parameters is ...@@ -57,7 +57,12 @@ package body System.Parameters is
pragma Import (C, Default_Stack_Size, "__gl_default_stack_size"); pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
begin begin
if Default_Stack_Size = -1 then if Default_Stack_Size = -1 then
if Stack_Check_Limits then
return 60 * 1024;
-- Extra stack to allow for 12K exception area.
else
return 20 * 1024; return 20 * 1024;
end if;
else else
return Size_Type (Default_Stack_Size); return Size_Type (Default_Stack_Size);
end if; end if;
......
...@@ -2675,10 +2675,13 @@ package body Sem_Ch7 is ...@@ -2675,10 +2675,13 @@ package body Sem_Ch7 is
-- If this is a private type with a full view (for example a local -- If this is a private type with a full view (for example a local
-- subtype of a private type declared elsewhere), ensure that the -- subtype of a private type declared elsewhere), ensure that the
-- full view is also removed from visibility: it may be exposed when -- 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 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; end if;
if Is_Tagged_Type (Id) and then Ekind (Id) = E_Record_Type then if Is_Tagged_Type (Id) and then Ekind (Id) = E_Record_Type then
......
...@@ -579,6 +579,13 @@ package body Switch.C is ...@@ -579,6 +579,13 @@ package body Switch.C is
-- -gnateg (generate C code) -- -gnateg (generate C code)
when 'g' => 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; Generate_C_Code := True;
Ptr := Ptr + 1; Ptr := Ptr + 1;
......
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