aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-04 11:47:14 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-04 11:47:14 +0200
commit29049f0b22b4475b4f8e0872b0455d025782e041 (patch)
treec9ba49866405f3050bb8de2fdb43f2badcc1cdb4 /gcc/ada/exp_util.adb
parentd26d790dca2c2135161666dc955cc39befbaf587 (diff)
downloadgcc-29049f0b22b4475b4f8e0872b0455d025782e041.zip
gcc-29049f0b22b4475b4f8e0872b0455d025782e041.tar.gz
gcc-29049f0b22b4475b4f8e0872b0455d025782e041.tar.bz2
[multiple changes]
2014-08-04 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Pred): Remove special test for Float'First, no longer required. (Expand_N_Attribute_Reference, case Succ): Remove special test for Float'First, no longer required. * s-fatgen.adb (Pred): return infinity unchanged. (Succ): ditto. 2014-08-04 Claire Dross <dross@adacore.com> * sem_ch12.adb (Analyze_Associations): Defaults should only be used if there is no explicit match. * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity): Also check for pragma external_axiomatization on generic units. From-SVN: r213546
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r--gcc/ada/exp_util.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index c1fca54..481fc37 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -3292,8 +3292,8 @@ package body Exp_Util is
-------------------------------------------------
function Get_First_Parent_With_Ext_Axioms_For_Entity
- (E : Entity_Id) return Entity_Id is
-
+ (E : Entity_Id) return Entity_Id
+ is
Decl : Node_Id;
begin
@@ -3305,9 +3305,9 @@ package body Exp_Util is
end if;
end if;
- -- E is the package which is externally axiomatized
+ -- E is the package or generic package which is externally axiomatized
- if Ekind (E) = E_Package
+ if Ekind_In (E, E_Package, E_Generic_Package)
and then Has_Annotate_Pragma_For_External_Axiomatization (E)
then
return E;
@@ -3318,14 +3318,14 @@ package body Exp_Util is
elsif Ekind (E) = E_Package
and then Present (Generic_Parent (Decl))
then
- return Get_First_Parent_With_Ext_Axioms_For_Entity
- (Generic_Parent (Decl));
+ return
+ Get_First_Parent_With_Ext_Axioms_For_Entity (Generic_Parent (Decl));
-- Otherwise, look at E's scope instead if present
elsif Present (Scope (E)) then
- return Get_First_Parent_With_Ext_Axioms_For_Entity
- (Scope (E));
+ return
+ Get_First_Parent_With_Ext_Axioms_For_Entity (Scope (E));
-- Else there is no such axiomatized package