summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_elim.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-14 10:56:22 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-14 10:56:22 +0000
commit2b184b2f86696c2607e30aa19e9ef92d67911fc6 (patch)
tree4fcf9aeac898e8c5349c2120203d8e8760d546a2 /gcc/ada/sem_elim.adb
parentcaf125ce0eba2635836221d92bf855b233305f89 (diff)
downloadgcc-2b184b2f86696c2607e30aa19e9ef92d67911fc6.tar.gz
2012-06-14 Vincent Pucci <pucci@adacore.com>
* exp_ch6.adb (Expand_Call): Expand_Put_Call_With_Dimension_Symbol call replaced by Expand_Put_Call_With_Symbol call. * sem_dim.adb: New fields Unit_Names, Unit_Symbols and Dim_Symbols for record type System_Type. (From_Dimension_To_String_Of_Symbols): Removed. (From_Dim_To_Str_Of_Dim_Symbols): Renames previous routine From_Dimension_To_String_Of_Symbols. (From_Dim_To_Str_Of_Unit_Symbols): New routine. (Analyze_Aspect_Dimension): argument Symbol in aspect Dimension aggregate is optional. Named association implemented. (Has_Compile_Time_Known_Expressions): Removed. (Analyze_Aspect_Dimension_System): New component Dim_Symbol in each Dimension aggregate in aspect Dimension_System. Named associations implemented. (Add_Dimension_Vector_To_Buffer): Removed. (Add_Whole_To_Buffer): Removed. (Expand_Put_Call_With_Dimension_Symbol.): Removed. (Expand_Put_Call_With_Symbol): Renames previous routine Expand_Put_Call_With_Dimension_Symbol. (Has_Dimension_Symbols): Removed. (Has_Symbols): Renames previous routine Has_Dimension_Symbols. (Store_String_Oexpon): New routine. * sem_dim.ads (Expand_Put_Call_With_Dimension_Symbol.): Removed. (Expand_Put_Call_With_Symbol): Renames previous routine Expand_Put_Call_With_Dimension_Symbol. * s-diflio.adb, s-diinio.adb (Put): Symbol renames Symbols. (Put_Dim_Of): New routines. * s-diflio.ads, s-diinio.ads: documentation updated. (Put): Symbol renames Symbols. (Put_Dim_Of): New routines. * s-dim.ads: documentation updated. * s-dimmks.ads: dimensioned type and subtypes updated. * snames.ads-tmpl: Name_Dim_Symbol, Name_Put_Dim_Of, Name_Symbol, and Name_Unit_Symbol added. Name_Symbols removed. 2012-06-14 Vincent Pucci <pucci@adacore.com> * freeze.adb (In_Exp_Body): Expression function case added. (Freeze_Expression): Insert the Freeze_Nodes list before the correct current scope in case of a quantified expression. 2012-06-14 Pascal Obry <obry@adacore.com> * projects.texi: Document the Install package for gprinstall. 2012-06-14 Ed Schonberg <schonberg@adacore.com> * sem_elim.adb (Check_For_Eliminated_Subprogram): Do not check within a default expression. * sem_res.adb (Resolve_Call): simplify code. 2012-06-14 Ed Schonberg <schonberg@adacore.com> * sem_case.adb (Check, Issue_Msg): within an instance, non-other values in a variant part or a case expression do not have to belong to the actual subtype. 2012-06-14 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Validate_Derived_Type_Instance): If parent is an interface type, check whether it is itself a previous formal already instantiated in the current list of actuals. 2012-06-14 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): The expression for a stream attribute is a name that may be overloaded with other declarations. To determine whether it matches the aspect at the freeze point, it is necessary to verify that one of its interpretations matches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_elim.adb')
-rw-r--r--gcc/ada/sem_elim.adb18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb
index aa6bbed1c88..3d1bd14eb7c 100644
--- a/gcc/ada/sem_elim.adb
+++ b/gcc/ada/sem_elim.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2012, 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- --
@@ -724,6 +724,14 @@ package body Sem_Elim is
Enclosing_Subp : Entity_Id;
begin
+ -- No check needed within a default expression for a formal, since this
+ -- is not really a use, and the expression (a call or attribute) may
+ -- never be used if the enclosing subprogram is itself eliminated.
+
+ if In_Spec_Expression then
+ return;
+ end if;
+
if Is_Eliminated (Ultimate_Subp)
and then not Inside_A_Generic
and then not Is_Generic_Unit (Cunit_Entity (Current_Sem_Unit))
@@ -823,10 +831,10 @@ package body Sem_Elim is
Arg_Uname : Node_Id;
function OK_Selected_Component (N : Node_Id) return Boolean;
- -- Test if N is a selected component with all identifiers, or a
- -- selected component whose selector is an operator symbol. As a
- -- side effect if result is True, sets Num_Names to the number
- -- of names present (identifiers and operator if any).
+ -- Test if N is a selected component with all identifiers, or a selected
+ -- component whose selector is an operator symbol. As a side effect if
+ -- result is True, sets Num_Names to the number of names present
+ -- (identifiers, and operator if any).
---------------------------
-- OK_Selected_Component --