From: Arnaud Charlet Date: Tue, 20 Oct 2015 10:04:44 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46ee0270b7a30d7d98eb0358079f5213556609b8;p=gcc.git [multiple changes] 2015-10-20 Vincent Celier * sem_cat.adb (Check_Categorization_Dependencies): Do nothing when -gnatdu is specified. 2015-10-20 Ed Schonberg * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a formal abstract subprogram must have a controlling type. * stand.ads: Minor whitespace cleanup. From-SVN: r229035 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e285e66d028..5196fa7f0a3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2015-10-20 Vincent Celier + + * sem_cat.adb (Check_Categorization_Dependencies): Do nothing + when -gnatdu is specified. + +2015-10-20 Ed Schonberg + + * sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a + formal abstract subprogram must have a controlling type. + * stand.ads: Minor whitespace cleanup. + 2015-10-20 Gary Dismukes * sem_ch13.adb: Minor reference change (RM => AARM). diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb index f8cf3ab9831..28742e45683 100644 --- a/gcc/ada/sem_cat.adb +++ b/gcc/ada/sem_cat.adb @@ -185,9 +185,10 @@ package body Sem_Cat is begin -- Intrinsic subprograms are preelaborated, so do not impose any - -- categorization dependencies. + -- categorization dependencies. Also, ignore categorization + -- dependencies when compilation switch -gnatdu is used. - if Is_Intrinsic_Subprogram (Depended_Entity) then + if Is_Intrinsic_Subprogram (Depended_Entity) or else Debug_Flag_U then return; end if; diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index db697d66416..d6cce978183 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -3221,7 +3221,13 @@ package body Sem_Ch8 is Find_Dispatching_Type (Old_S); begin - if Old_S_Ctrl_Type /= New_S_Ctrl_Type then + + -- The actual must match the (instance of the) formal, + -- and must be a controlling type. + + if Old_S_Ctrl_Type /= New_S_Ctrl_Type + or else No (New_S_Ctrl_Type) + then Error_Msg_NE ("actual must be dispatching subprogram for type&", Nam, New_S_Ctrl_Type); diff --git a/gcc/ada/stand.ads b/gcc/ada/stand.ads index e93e9b4b89b..c2e8bc7aba3 100644 --- a/gcc/ada/stand.ads +++ b/gcc/ada/stand.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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- -- @@ -330,13 +330,13 @@ package Stand is -- situations. They have names that are suitable for use in such -- error messages (see body for actual names used). - Standard_Void_Type : Entity_Id; + Standard_Void_Type : Entity_Id; -- This is a type used to represent the return type of procedures - Standard_Exception_Type : Entity_Id; + Standard_Exception_Type : Entity_Id; -- This is a type used to represent the Etype of exceptions - Standard_A_String : Entity_Id; + Standard_A_String : Entity_Id; -- An access to String type used for building elements of tables -- carrying the enumeration literal names. @@ -446,8 +446,8 @@ package Stand is -- this type is always IEEE format. Universal_Fixed : Entity_Id; - -- Entity for universal fixed type. This is a type with arbitrary - -- precision that can only appear in a context with a specific type. + -- Entity for universal fixed type. This is a type with arbitrary + -- precision that can only appear in a context with a specific type. -- Universal_Fixed labels the result of multiplication or division of -- two fixed point numbers, and has no specified bounds (since, unlike -- universal integer and universal real, it is never used for runtime