aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-12 11:42:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-12 11:42:31 +0200
commit92cbddaa2ae10e2cb208067b0fc2871ab81a62bc (patch)
tree99e4763094e799e398df88b7a5f9765b442ca1c8 /gcc/ada/sem_attr.adb
parent718deaf1af8c923d15f417fd3b49ba909c5f26eb (diff)
downloadgcc-92cbddaa2ae10e2cb208067b0fc2871ab81a62bc.zip
gcc-92cbddaa2ae10e2cb208067b0fc2871ab81a62bc.tar.gz
gcc-92cbddaa2ae10e2cb208067b0fc2871ab81a62bc.tar.bz2
[multiple changes]
2010-10-12 Robert Dewar <dewar@adacore.com> * par-endh.adb (Check_End): Don't swallow semicolon or aspects after END RECORD. * sem_attr.adb (Eval_Attribute): Code clean up. 2010-10-12 Robert Dewar <dewar@adacore.com> * par-ch12.adb (P_Formal_Private_Type_Definition): Improve error messages and recovery for case of out of order Abstract/Tagged/Private keywords. * par-ch3.adb (P_Type_Declaration): Improve error messages and recovery for case of out of order Abstract/Tagged/Private keywords. 2010-10-12 Ed Schonberg <schonberg@adacore.com> * inline.adb (Analyze_Inlined_Bodies): Restrict previous change to case where child unit is main unit of compilation. From-SVN: r165354
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb41
1 files changed, 14 insertions, 27 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 469e77c..3c8a03d 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -5375,33 +5375,20 @@ package body Sem_Attr is
-- constructs from this test comes from some internal usage in packed
-- arrays, which otherwise fails, could use more analysis perhaps???
- declare
- function Within_Aspect (N : Node_Id) return Boolean;
- -- True if within aspect expression. Giant kludge, do this test only
- -- within an aspect, since doing it more widely, even though clearly
- -- correct, causes regressions notably in GA19-001 ???
-
- function Within_Aspect (N : Node_Id) return Boolean
- is
- begin
- if No (Parent (N)) then
- return False;
- elsif Nkind (N) = N_Aspect_Specification then
- return True;
- else
- return Within_Aspect (Parent (N));
- end if;
- end Within_Aspect;
-
- begin
- if In_Spec_Expression
- and then Comes_From_Source (N)
- and then not (Is_Entity_Name (P) and then Is_Frozen (Entity (P)))
- and then Within_Aspect (N)
- then
- return;
- end if;
- end;
+ -- We do however go ahead with generic actual types, otherwise we get
+ -- some regressions, probably these types should be frozen anyway???
+
+ if In_Spec_Expression
+ and then Comes_From_Source (N)
+ and then not (Is_Entity_Name (P)
+ and then
+ (Is_Frozen (Entity (P))
+ or else (Is_Type (Entity (P))
+ and then
+ Is_Generic_Actual_Type (Entity (P)))))
+ then
+ return;
+ end if;
-- Acquire first two expressions (at the moment, no attributes take more
-- than two expressions in any case).