From: Pierre-Marie de Rodat Date: Fri, 29 Sep 2017 13:04:47 +0000 (+0000) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20ad05861ecf0e6867eea22ab49f0cbe6b1e4768;p=gcc.git [multiple changes] 2017-09-29 Justin Squirek * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle all cases related to marking entity identifiers. 2017-09-29 Vasiliy Fofanov * adaint.c (win32_wait): Properly handle error and take into account the WIN32 limitation on the number of simultaneous wait objects. 2017-09-29 Vasiliy Fofanov * cal.c: Minor proofreading. 2017-09-29 Vasiliy Fofanov * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix. * gnat_ugn.texi: Regenerate. 2017-09-29 Bob Duff * lib-xref.ads: Comment fix. 2017-09-29 Bob Duff * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants. Discriminants can't need finalization. 2017-09-29 Ed Schonberg * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes for types in expression if the function is within a generic unit. * sem_res.adb (Resolve): In a generic context do not freeze an expression, unless it is an entity. This exception is solely for the purpose of detecting illegal uses of deferred constants in generic units. * sem_res.adb: Minor reformatting. From-SVN: r253285 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 582dcbbc845..8b566a7cbce 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,41 @@ +2017-09-29 Justin Squirek + + * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle + all cases related to marking entity identifiers. + +2017-09-29 Vasiliy Fofanov + + * adaint.c (win32_wait): Properly handle error and take into account + the WIN32 limitation on the number of simultaneous wait objects. + +2017-09-29 Vasiliy Fofanov + + * cal.c: Minor proofreading. + +2017-09-29 Vasiliy Fofanov + + * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix. + * gnat_ugn.texi: Regenerate. + +2017-09-29 Bob Duff + + * lib-xref.ads: Comment fix. + +2017-09-29 Bob Duff + + * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants. + Discriminants can't need finalization. + +2017-09-29 Ed Schonberg + + * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes + for types in expression if the function is within a generic unit. + * sem_res.adb (Resolve): In a generic context do not freeze an + expression, unless it is an entity. This exception is solely for the + purpose of detecting illegal uses of deferred constants in generic + units. + * sem_res.adb: Minor reformatting. + 2017-09-29 Justin Squirek * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false diff --git a/gcc/ada/cal.c b/gcc/ada/cal.c index 14921dcf440..05e4953f209 100644 --- a/gcc/ada/cal.c +++ b/gcc/ada/cal.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2014, Free Software Foundation, Inc. * + * Copyright (C) 1992-2017, 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- * @@ -29,10 +29,10 @@ * * ****************************************************************************/ -/* This file contains those routines named by Import pragmas in package */ +/* This file contains routines marked with pragmas Import in package */ /* GNAT.Calendar. It is used to do Duration to timeval conversion. */ -/* These are simple wrappers function to abstract the fact that the C */ -/* struct timeval fields type are not normalized (they are generally */ +/* These are simple wrapper functions to abstract the fact that the C */ +/* struct timeval fields are not normalized (they are generally */ /* defined as int or long values). */ #if defined (__vxworks) diff --git a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst index 91363500ab8..3f5f2d64c6b 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst @@ -365,7 +365,7 @@ Switches for ``gnatls`` .. index:: --RTS (gnatls) -:switch:`--RTS={rts-path}`` +:switch:`--RTS={rts-path}` Specifies the default location of the runtime library. Same meaning as the equivalent ``gnatmake`` flag (:ref:`Switches_for_gnatmake`). diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 2fa0dc52b7a..0d6d3d14c9d 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -2725,7 +2725,6 @@ package body Exp_Aggr is Selector_Name => New_Occurrence_Of (Discr, Loc)), Expression => New_Copy_Tree (Discr_Val)); - Set_No_Ctrl_Actions (Discr_Init); Append_To (List, Discr_Init); end if; @@ -2763,7 +2762,6 @@ package body Exp_Aggr is Name => Comp_Expr, Expression => New_Copy_Tree (Discriminant_Value)); - Set_No_Ctrl_Actions (Instr); Append_To (L, Instr); Next_Discriminant (Discriminant); @@ -2795,7 +2793,6 @@ package body Exp_Aggr is Name => Comp_Expr, Expression => New_Copy_Tree (Discriminant_Value)); - Set_No_Ctrl_Actions (Instr); Append_To (L, Instr); Next_Stored_Discriminant (Discriminant); diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 22d6f1469ec..5fdb2724ba1 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Sep 25, 2017 +GNAT User's Guide for Native Platforms , Sep 29, 2017 AdaCore @@ -17654,7 +17654,7 @@ Add @code{dir} at the beginning of the project search dir. @table @asis -@item @code{--RTS=@emph{rts-path}`} +@item @code{--RTS=@emph{rts-path}} Specifies the default location of the runtime library. Same meaning as the equivalent @code{gnatmake} flag (@ref{dc,,Switches for gnatmake}). diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads index ecb70b60f15..d4216396c9c 100644 --- a/gcc/ada/lib-xref.ads +++ b/gcc/ada/lib-xref.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2016, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2017, 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- -- @@ -611,7 +611,8 @@ package Lib.Xref is Table_Name => "Name_Deferred_References"); procedure Process_Deferred_References; - -- This procedure is called from Frontend to process these table entries + -- This procedure is called from Frontend to process these table entries. + -- It is also called from Sem_Warn. function Has_Deferred_Reference (Ent : Entity_Id) return Boolean; -- Determine whether arbitrary entity Ent has a pending reference in order diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 9ef0acaaf49..cf1b83f0ade 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -568,8 +568,11 @@ package body Sem_Ch6 is -- Note that we cannot defer this freezing to the analysis of the -- expression itself, because a freeze node might appear in a nested -- scope, leading to an elaboration order issue in gigi. + -- As elsewhere, we do not emit freeze nodes within a generic unit. - Freeze_Expr_Types (Def_Id); + if not Inside_A_Generic then + Freeze_Expr_Types (Def_Id); + end if; -- For navigation purposes, indicate that the function is a body diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 3eec5717f68..77df1c85010 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -8405,15 +8405,7 @@ package body Sem_Ch8 is or else (Present (Prefix (Id)) and then Scope (Entity (Id)) /= Entity (Prefix (Id))) then - -- There is a case whereby a unary operator is used within a - -- qualified expression, so mark the parameters as well as the - -- entity. - - if Nkind (Entity (Id)) = N_Defining_Operator_Symbol then - Mark_Parameters (Entity (Id)); - end if; - - Mark_Use_Package (Scope (Entity (Id))); + Mark_Use_Clauses (Entity (Id)); end if; end if; end if; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 803ad0eb0ae..1435e047f5a 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -3070,7 +3070,14 @@ package body Sem_Res is -- Here we are resolving the corresponding expanded body, so we do -- need to perform normal freezing. - Freeze_Expression (N); + -- As elsewhere we do not emit freeze node within a generic. We make + -- an exception for entities that are expressions, only to detect + -- misuses of deferred constants and preserve the output of various + -- tests. + + if not Inside_A_Generic or else Is_Entity_Name (N) then + Freeze_Expression (N); + end if; -- Now we can do the expansion