aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-21 10:50:36 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-21 10:50:36 +0200
commit2d6aa71558f460ef00af8420e81e01f46d95da84 (patch)
treeea8cc0c200b4dbee8969f7837027839c0ce74ed7 /gcc/ada/sem_ch12.adb
parent08f52d9f8462f6d35a82fe51818929fc563b4285 (diff)
downloadgcc-2d6aa71558f460ef00af8420e81e01f46d95da84.zip
gcc-2d6aa71558f460ef00af8420e81e01f46d95da84.tar.gz
gcc-2d6aa71558f460ef00af8420e81e01f46d95da84.tar.bz2
[multiple changes]
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch5.adb: Minor reformatting. 2016-04-21 Eric Botcazou <ebotcazou@adacore.com> * exp_ch2.adb (Expand_Current_Value): Make an appropriate character literal if the entity is of a character type. 2016-04-21 Arnaud Charlet <charlet@adacore.com> * exp_aggr.adb (Backend_Processing_Possible): Return False when generating C and aggregate contains function calls. 2016-04-21 Tristan Gingold <gingold@adacore.com> * krunch.adb (Krunch): Only partially krunch children of Interfaces that aren't known. 2016-04-21 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Make_Inline): Handle properly the instantiation of a generic subpprogram that carries an Inline aspect. Place inline info on the anonymous subprogram that is constructed in the wrapper package. (Analyze_Pragma, case Pure): Do not check placement if pragma appears within an instantiation, which can be nested at any level. * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze node from anonymous subprogram to its visible renaming. The freeze node will be constructed if the subprogram carries delayed aspects. (Set_Global): Preserve dimension information if present (from code reading). 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com> * gnatlink.adb: Change wording of the warning message on problematic filenames to be more neutral. Add a new substring "patch" introduced on Windows 10. From-SVN: r235313
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb29
1 files changed, 26 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 5f77f571..1d4d5c0 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-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- --
@@ -4947,9 +4947,13 @@ package body Sem_Ch12 is
Set_Cunit_Entity (Current_Sem_Unit, Pack_Id);
end if;
- -- The instance is not a freezing point for the new subprogram
+ -- The instance is not a freezing point for the new subprogram.
+ -- The anonymous subprogram may have a freeze node, created for
+ -- some delayed aspects. This freeze node must not be inherited
+ -- by the visible subprogram entity.
- Set_Is_Frozen (Act_Decl_Id, False);
+ Set_Is_Frozen (Act_Decl_Id, False);
+ Set_Freeze_Node (Act_Decl_Id, Empty);
if Nkind (Defining_Entity (N)) = N_Defining_Operator_Symbol then
Valid_Operator_Definition (Act_Decl_Id);
@@ -7690,6 +7694,18 @@ package body Sem_Ch12 is
end if;
end if;
+ -- Propagate dimensions if present, so that they are reflected in the
+ -- instance.
+
+ if Nkind (N) in N_Has_Etype
+ and then (Nkind (N) in N_Op or else Is_Entity_Name (N))
+ and then Present (Etype (N))
+ and then Is_Floating_Point_Type (Etype (N))
+ and then Has_Dimension_System (Etype (N))
+ then
+ Copy_Dimensions (N, New_N);
+ end if;
+
return New_N;
end Copy_Generic_Node;
@@ -14140,6 +14156,13 @@ package body Sem_Ch12 is
Set_Etype (N2, Full_View (Typ));
end if;
end if;
+
+ if Is_Floating_Point_Type (Typ)
+ and then Has_Dimension_System (Typ)
+ then
+ Copy_Dimensions (N2, N);
+ end if;
+
end Set_Global_Type;
------------------