summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 09:32:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 09:32:00 +0000
commit26a987308ddcfc00f36313f31eac21e361d957a8 (patch)
tree80017fd93120d6e62909d4bd5349d7d628a53e0c /gcc/ada/sem_ch12.adb
parentb6f6bb02a7f7ca8201854889207bcecef3c4221a (diff)
downloadgcc-26a987308ddcfc00f36313f31eac21e361d957a8.tar.gz
2014-08-01 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Remove the VMS specific stuff. Integrate in procedure GNATCmd the relevant declarations from packages VMS_Cmds and VMS_Conv. * gnatcmd.ads: Update comments to remove any trace of VMS 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for defaulted actual that is an operator, before building wrapper for it in GNATprove mode. Restrict construction of wrapper to actuals that are operators. 2014-08-01 Vincent Celier <celier@adacore.com> * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS specific packages no longer needed. 2014-08-01 Pascal Obry <obry@adacore.com> * s-os_lib.ads (System.CRTL): Move with clause to body. (File_Size): New type. (File_Length64): Use it. (File_Length): Restore previous spec returning a Long_Integer. * s-os_lib.adb (System.CRTL): Move with clause here. 2014-08-01 Vincent Celier <celier@adacore.com> * mlib-prj.adb: Update comments to remove any mention of VMS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb24
1 files changed, 22 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index db449d88320..d1f712ad1ab 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -1137,6 +1137,15 @@ package body Sem_Ch12 is
end if;
end if;
+ -- Propagate visible entity to operator node, either from a
+ -- given actual or from a default.
+
+ if Is_Entity_Name (Actual)
+ and then Nkind (Expr) in N_Op
+ then
+ Set_Entity (Expr, Entity (Actual));
+ end if;
+
Decl :=
Make_Expression_Function (Loc,
Specification => Spec,
@@ -1669,7 +1678,19 @@ package body Sem_Ch12 is
-- If actual is an entity (function or operator),
-- build wrapper for it.
- if Present (Match) and then Is_Entity_Name (Match) then
+ if Present (Match)
+ and then Nkind (Match) = N_Operator_Symbol
+ then
+
+ -- If the name is a default, find its visible
+ -- entity at the point of instantiation.
+
+ if Is_Entity_Name (Match)
+ and then No (Entity (Match))
+ then
+ Find_Direct_Name (Match);
+ end if;
+
Append_To (Assoc,
Build_Wrapper
(Defining_Entity (Analyzed_Formal), Match));
@@ -1679,7 +1700,6 @@ package body Sem_Ch12 is
elsif Box_Present (Formal)
and then Nkind (Defining_Entity (Analyzed_Formal))
= N_Defining_Operator_Symbol
-
then
Append_To (Assoc,
Build_Wrapper