aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-16 12:51:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-16 12:51:32 +0200
commit872dae48e2bb95295eb596e55cabe0eab8792253 (patch)
treeed845681cc7d7b82e1510f24702f62019f97f45c /gcc
parent1bc619ef941fca4db7469d425bb09b4abcf1f3b4 (diff)
downloadgcc-872dae48e2bb95295eb596e55cabe0eab8792253.zip
gcc-872dae48e2bb95295eb596e55cabe0eab8792253.tar.gz
gcc-872dae48e2bb95295eb596e55cabe0eab8792253.tar.bz2
[multiple changes]
2015-10-16 Bob Duff <duff@adacore.com> * debug.adb: Document -gnatdQ switch. 2015-10-16 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that a formal abstract subprogram cannot have a null default: RM 12.6 (4 1.2). From-SVN: r228869
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/debug.adb7
-rw-r--r--gcc/ada/sem_ch12.adb19
3 files changed, 31 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b36b8de..302c4e7 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,15 @@
2015-10-16 Bob Duff <duff@adacore.com>
+ * debug.adb: Document -gnatdQ switch.
+
+2015-10-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch12.adb (Analyze_Formal_Subprogram): Implement rule that
+ a formal abstract subprogram cannot have a null default: RM 12.6
+ (4 1.2).
+
+2015-10-16 Bob Duff <duff@adacore.com>
+
* sem_util.ads, sinput.ads, bcheck.adb: Minor comment fixes.
2015-10-16 Javier Miranda <miranda@adacore.com>
diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
index 87e0de7..7f70bfa 100644
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -80,7 +80,7 @@ package body Debug is
-- dN No file name information in exception messages
-- dO Output immediate error messages
-- dP Do not check for controlled objects in preelaborable packages
- -- dQ
+ -- dQ Use old secondary stack method
-- dR Bypass check for correct version of s-rpc
-- dS Never convert numbers to machine numbers in Sem_Eval
-- dT Convert to machine numbers only for constant declarations
@@ -430,6 +430,11 @@ package body Debug is
-- in preelaborable packages, but this restriction is a huge pain,
-- especially in the predefined library units.
+ -- dQ Use old method for determining what goes on the secondary stack.
+ -- This disables some newer optimizations. The intent is to use this
+ -- temporarily to measure before/after efficiency. ???Remove this
+ -- when we are done (see Sem_Util.Requires_Transient_Scope).
+
-- dR Bypass the check for a proper version of s-rpc being present
-- to use the -gnatz? switch. This allows debugging of the use
-- of stubs generation without needing to have GLADE (or some
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index ecc3a8e..4817625 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -1075,7 +1075,7 @@ package body Sem_Ch12 is
-- package. As usual an other association must be last in the list.
procedure Check_Overloaded_Formal_Subprogram (Formal : Entity_Id);
- -- Apply RM 12.3 (9): if a formal subprogram is overloaded, the instance
+ -- Apply RM 12.3(9): if a formal subprogram is overloaded, the instance
-- cannot have a named association for it. AI05-0025 extends this rule
-- to formals of formal packages by AI05-0025, and it also applies to
-- box-initialized formals.
@@ -2820,8 +2820,19 @@ package body Sem_Ch12 is
if Nkind (N) = N_Formal_Abstract_Subprogram_Declaration then
Set_Is_Abstract_Subprogram (Nam);
+
Set_Is_Dispatching_Operation (Nam);
+ -- A formal abstract procedure cannot have a null default
+ -- (RM 12.6(4 1.2)).
+
+ if Nkind (Spec) = N_Procedure_Specification
+ and then Null_Present (Spec)
+ then
+ Error_Msg_N
+ ("a formal abstract subprogram cannot default to null", Spec);
+ end if;
+
declare
Ctrl_Type : constant Entity_Id := Find_Dispatching_Type (Nam);
begin
@@ -10737,7 +10748,7 @@ package body Sem_Ch12 is
-- Re-establish the state of information on which checks are suppressed.
-- This information was set in Body_Info at the point of instantiation,
-- and now we restore it so that the instance is compiled using the
- -- check status at the instantiation (RM 11.5 (7.2/2), AI95-00224-01).
+ -- check status at the instantiation (RM 11.5(7.2/2), AI95-00224-01).
Local_Suppress_Stack_Top := Body_Info.Local_Suppress_Stack_Top;
Scope_Suppress := Body_Info.Scope_Suppress;
@@ -11052,7 +11063,7 @@ package body Sem_Ch12 is
-- Re-establish the state of information on which checks are suppressed.
-- This information was set in Body_Info at the point of instantiation,
-- and now we restore it so that the instance is compiled using the
- -- check status at the instantiation (RM 11.5 (7.2/2), AI95-00224-01).
+ -- check status at the instantiation (RM 11.5(7.2/2), AI95-00224-01).
Local_Suppress_Stack_Top := Body_Info.Local_Suppress_Stack_Top;
Scope_Suppress := Body_Info.Scope_Suppress;
@@ -11970,7 +11981,7 @@ package body Sem_Ch12 is
-- If the formal and actual types are abstract, check that there
-- are no abstract primitives of the actual type that correspond to
-- nonabstract primitives of the formal type (second sentence of
- -- RM95-3.9.3(9)).
+ -- RM95 3.9.3(9)).
if Is_Abstract_Type (A_Gen_T) and then Is_Abstract_Type (Act_T) then
Check_Abstract_Primitives : declare