aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aggr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-06-25 11:34:02 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-06-25 11:34:02 +0200
commit2a31c32ba59f8772f3bdf62b7f74523d0a0a4583 (patch)
treee33ff61b64fe2dc5c8b03a655de538b8f1d30368 /gcc/ada/sem_aggr.adb
parentfadcf3134557b94e1e52b8d9d6aa95e2ec2443ef (diff)
downloadgcc-2a31c32ba59f8772f3bdf62b7f74523d0a0a4583.zip
gcc-2a31c32ba59f8772f3bdf62b7f74523d0a0a4583.tar.gz
gcc-2a31c32ba59f8772f3bdf62b7f74523d0a0a4583.tar.bz2
[multiple changes]
2009-06-25 Vincent Celier <celier@adacore.com> * vms_data.ads: Minor comment change 2009-06-25 Gary Dismukes <dismukes@adacore.com> * exp_ch5.adb (Expand_N_Extended_Return_Statement): Don't build an assignment statement to targeting a caller-provided object when the result type is an interface type. * exp_ch6.adb (Expand_Call): Remove redundant test of Is_Limited_Interface (Is_Inherently_Limited is sufficient). (Is_Build_In_Place_Function): Remove test for Is_Limited_Interface. * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Add type in call to OK_For_Limited_Init. * sem_aux.adb (Is_Inherently_Limited_Type): Revise limited type condition so that True is returned for all limited interfaces, not just synchronized ones. Ignore components of an interface type when checking for limited components (such a component can be a parent component). * sem_ch3.ads (OK_For_Limited_Init_In_05): Add type parameter. (OK_For_Limited_Init): Add type parameter. * sem_ch3.adb (Check_Initialization): Add type in call to OK_For_Limited_Init. (OK_For_Limited_Init): Add new type param in call to OK_For_Limited_Init_In_05. (OK_For_Limited_Init_In_05): Permit arbitrary expressions of a nonlimited type when the context type is a limited interface. Add type on recursive calls. * sem_ch4.adb (Analyze_Allocator): Add type in call to OK_For_Limited_Init. * sem_ch6.adb (Check_Limited_Return): Add type in call to OK_For_Limited_Init. * sem_ch12.adb (Analyze_Formal_Object_Declaration): Add type in call to OK_For_Limited_Init. (Instantiate_Object): Add type in call to OK_For_Limited_Init. * sem_type.adb (Interface_Present_In_Ancestor): In the case of a class-wide interface, get the base type before applying Etype, in order to account for class-wide subtypes. From-SVN: r148938
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r--gcc/ada/sem_aggr.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 66653f6..43ed7c0 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -776,7 +776,7 @@ package body Sem_Aggr is
and then Comes_From_Source (Expr)
and then not In_Instance_Body
then
- if not OK_For_Limited_Init (Expr) then
+ if not OK_For_Limited_Init (Etype (Expr), Expr) then
Error_Msg_N ("initialization not allowed for limited types", Expr);
Explain_Limited_Type (Etype (Expr), Expr);
end if;