summaryrefslogtreecommitdiff
path: root/gcc/ada/freeze.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-10 14:42:22 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-10 14:42:22 +0000
commitb94a633e0a9a5310e48bf94451a9e0aba9db77b2 (patch)
tree4e89aa071c2c8b341feee15fcf146fadb30f2631 /gcc/ada/freeze.adb
parentdd2f3435bf50613c48a6609e385d5730bc80ba4c (diff)
downloadgcc-b94a633e0a9a5310e48bf94451a9e0aba9db77b2.tar.gz
2014-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects): Aspect specification is legal on a local instantiation of a library-level generic unit. 2014-10-10 Gary Dismukes <dismukes@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining if inlining has been enabled via -gnatn and the target is not GCC. 2014-10-10 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): Freezing a subprogram does not always freeze its profile. In particular, an attribute reference that takes the access type does not freeze the types of the formals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r--gcc/ada/freeze.adb12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 7fdd2ab5289..bdc2ea15e7c 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -4004,7 +4004,17 @@ package body Freeze is
-- any extra formal parameters are created since we now know
-- whether the subprogram will use a foreign convention.
- if not Is_Internal (E) then
+ -- In Ada 2012, freezing a subprogram does not always freeze
+ -- the corresponding profile (see AI05-019). An attribute
+ -- reference is not a freezing point of the profile.
+ -- Other constructs that should not freeze ???
+
+ if Ada_Version > Ada_2005
+ and then Nkind (N) = N_Attribute_Reference
+ then
+ null;
+
+ elsif not Is_Internal (E) then
declare
F_Type : Entity_Id;
R_Type : Entity_Id;