diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-27 14:37:55 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-27 14:37:55 +0200 |
commit | 888be6b18a697c7f57f2f74fa8dbab058bb819ef (patch) | |
tree | d648d4e011ee94742841faaa4b264c82163554e4 /gcc/ada/sem_dim.ads | |
parent | c7518e6f52aad178875818666fcfc92ff4e08e8f (diff) | |
download | gcc-888be6b18a697c7f57f2f74fa8dbab058bb819ef.zip gcc-888be6b18a697c7f57f2f74fa8dbab058bb819ef.tar.gz gcc-888be6b18a697c7f57f2f74fa8dbab058bb819ef.tar.bz2 |
[multiple changes]
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
(Resolve_Actuals): Flag effectively volatile objects with enabled
property Async_Writers or Effective_Reads as illegal.
* sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
2016-04-27 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Make_Predefined_Primitive_Specs):
Do not generate the profile of the equality operator if it has
been explicitly defined as abstract in the parent type. Required
to avoid reporting an spurious error.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
procedure to compute the dimension vector of a scalar expression
and compare it with the dimensions if its expected subtype. Used
for the ultimate components of a multidimensional aggregate,
whose components typically are themselves aggregates that are
expanded separately. Previous to this patch, dimensionality
checking on such aggregates generated spurious errors.
* sem_aggr.adb (Resolve_Array_Aggregate): Use
Check_Expression_Dimensions when needed.
2016-04-27 Javier Miranda <miranda@adacore.com>
* einfo.ads, einfo.adb (Corresponding_Function): New attribute
(applicable to E_Procedure).
(Corresponding_Procedure): New attribute (applicable to E_Function).
* exp_util.adb (Build_Procedure_Form): Link the function with
its internally built proc and viceversa.
* sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
attribute Rewritten_For_C and Corresponding_Procedure to the body.
* exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
(Rewritten_For_C_Proc_Id): Removed.
* exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
locate the corresponding procedure.
From-SVN: r235493
Diffstat (limited to 'gcc/ada/sem_dim.ads')
-rw-r--r-- | gcc/ada/sem_dim.ads | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/sem_dim.ads b/gcc/ada/sem_dim.ads index d1521e9..bce497a 100644 --- a/gcc/ada/sem_dim.ads +++ b/gcc/ada/sem_dim.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2011-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2016, 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- -- @@ -164,6 +164,16 @@ package Sem_Dim is -- For sub spec N, issue a warning for each dimensioned formal with a -- literal default value in the list of formals Formals. + procedure Check_Expression_Dimensions + (Expr : Node_Id; + Typ : Entity_Id); + -- Compute dimensions of a floating-point expression and compare them + -- with the dimensions of a the given type. Used to verify dimensions + -- of the components of a multidimensional array type, for which components + -- are typically themselves arrays. The resolution of such arrays delays + -- the resolution of the ultimate components to a separate phase, which + -- forces this separate dimension verification. + procedure Copy_Dimensions (From, To : Node_Id); -- Copy dimension vector of node From to node To. Note that To must be a -- node that is allowed to contain a dimension (see OK_For_Dimension in |