From: Arnaud Charlet Date: Wed, 24 Apr 2013 13:17:28 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f50597830e668d54c3c08c26027e64ad92db85f;p=gcc.git [multiple changes] 2013-04-24 Ed Schonberg * sem_aux.adb: Add guard in Available_View. 2013-04-24 Hristian Kirtchev * 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. From-SVN: r198229 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 93955a03843..f33d03b9a63 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2013-04-24 Ed Schonberg + + * sem_aux.adb: Add guard in Available_View. + +2013-04-24 Hristian Kirtchev + + * 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 * 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 23b8f592aa9..3c5d2af59ba 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 9339d490c97..089c1157fef 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