diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-21 10:25:21 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-21 10:25:21 +0200 |
commit | 6dc87f5f53deaabf19384afd42d5dbcad7591be7 (patch) | |
tree | 3022799946c97e3950d7b19f5a16e2ee17dfe5ab /gcc/ada/sem_attr.adb | |
parent | a14bbbb4a41ec6bfc503759e132445d421e3b7f1 (diff) | |
download | gcc-6dc87f5f53deaabf19384afd42d5dbcad7591be7.zip gcc-6dc87f5f53deaabf19384afd42d5dbcad7591be7.tar.gz gcc-6dc87f5f53deaabf19384afd42d5dbcad7591be7.tar.bz2 |
[multiple changes]
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
* sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb: Minor reformatting.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: Minor comment update.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
boolean parameter to determine whether freezing an overloadable
entity freezes its profile as well. This is required by
AI05-019. The call to Freeze_Profile within Freeze_Entity is
conditioned by the value of this flag, whose default is True.
* sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
reference freezes the prefix, but it the prefix is a subprogram
it does not freeze its profile.
From-SVN: r235308
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index e8483b9..099a1b8 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.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- -- @@ -10161,18 +10161,20 @@ package body Sem_Attr is end loop; -- If Prefix is a subprogram name, this reference freezes, - -- but not if within spec expression mode + -- but not if within spec expression mode. The profile of + -- the subprogram is not frozen at this point. if not In_Spec_Expression then - Freeze_Before (N, Entity (P)); + Freeze_Before (N, Entity (P), False); end if; - -- If it is a type, there is nothing to resolve. If it is an - -- object, complete its resolution. + -- If it is a type, there is nothing to resolve. + -- If it is a subprogram, do not freeze its profile. + -- If it is an object, complete its resolution. elsif Is_Overloadable (Entity (P)) then if not In_Spec_Expression then - Freeze_Before (N, Entity (P)); + Freeze_Before (N, Entity (P), False); end if; -- Nothing to do if prefix is a type name |