diff options
-rw-r--r-- | gcc/ada/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/ada/sem_aux.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 8 |
3 files changed, 21 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 93955a0..f33d03b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2013-04-24 Ed Schonberg <schonberg@adacore.com> + + * sem_aux.adb: Add guard in Available_View. + +2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_prag.adb (Analyze_Depends_In_Decl_Part): Use + Find_Related_Subprogram to find the associated subprogram. + (Analyze_Global_In_Decl_List): Use Find_Related_Subprogram + to find the associated subprogram. + (Analyze_Pragma): Use Find_Related_Subprogram to find the associated + subprogram. + 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb: Remove with and use clause for Sem_Prag. diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb index 23b8f59..3c5d2af 100644 --- a/gcc/ada/sem_aux.adb +++ b/gcc/ada/sem_aux.adb @@ -86,8 +86,12 @@ package body Sem_Aux is return Get_Full_View (Non_Limited_View (Typ)); + -- If it is class_wide, check whether the specific type comes from + -- A limited_with. + elsif Is_Class_Wide_Type (Typ) and then Is_Incomplete_Type (Etype (Typ)) + and then From_With_Type (Etype (Typ)) and then Present (Non_Limited_View (Etype (Typ))) then return Class_Wide_Type (Non_Limited_View (Etype (Typ))); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 9339d49..089c115 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1370,7 +1370,7 @@ package body Sem_Prag is begin Set_Analyzed (N); - Subp_Decl := Parent (Corresponding_Aspect (N)); + Subp_Decl := Find_Related_Subprogram (N); Subp_Id := Defining_Unit_Name (Specification (Subp_Decl)); Clause := Expression (Arg1); @@ -1746,7 +1746,7 @@ package body Sem_Prag is begin Set_Analyzed (N); - Subp_Decl := Parent (Corresponding_Aspect (N)); + Subp_Decl := Find_Related_Subprogram (N); Subp_Id := Defining_Unit_Name (Specification (Subp_Decl)); List := Expression (Arg1); @@ -10625,7 +10625,7 @@ package body Sem_Prag is -- associated with a subprogram declaration or a body that acts -- as a spec. - Subp_Decl := Parent (Corresponding_Aspect (N)); + Subp_Decl := Find_Related_Subprogram (N, Check_Duplicates => True); if Nkind (Subp_Decl) /= N_Subprogram_Declaration and then (Nkind (Subp_Decl) /= N_Subprogram_Body @@ -11904,7 +11904,7 @@ package body Sem_Prag is -- associated with a subprogram declaration or a body that acts -- as a spec. - Subp_Decl := Parent (Corresponding_Aspect (N)); + Subp_Decl := Find_Related_Subprogram (N, Check_Duplicates => True); if Nkind (Subp_Decl) /= N_Subprogram_Declaration and then (Nkind (Subp_Decl) /= N_Subprogram_Body |