summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gcc.gnu.org>2001-12-12 00:01:00 +0100
committerGeert Bosch <bosch@gcc.gnu.org>2001-12-12 00:01:00 +0100
commit7fb754a1ad3d542eca7724a944fa54e8bebbbff4 (patch)
tree11d29e57da04b303a82bfe15ecbabc386ef4ea29 /gcc/ada/sem_ch12.adb
parent0873bafcaa07ec24cc51e2bced0458252b5d028e (diff)
downloadgcc-7fb754a1ad3d542eca7724a944fa54e8bebbbff4.tar.gz
freeze.adb: Make Freeze_Fixed_Point_Type visible, for use in sem_attr.
* freeze.adb: Make Freeze_Fixed_Point_Type visible, for use in sem_attr. * sem_attr.adb: Simplify previous fix for Address. (Set_Bounds): If prefix is a non-frozen fixed-point type, freeze now, to avoid anomalies where the bound of the type appears to raise constraint error. * lib-xref.adb (Output_Refs): Make sure pointers are always properly handled. * sem_ch12.adb (Analyze_Subprogram_Instantiation): Check for a renamed unit before checking for recursive instantiations. * prj.ads: Add comments for some of the fields. From-SVN: r47902
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 2f821b1c72b..71604f68c56 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3050,12 +3050,6 @@ package body Sem_Ch12 is
elsif In_Open_Scopes (Gen_Unit) then
Error_Msg_NE ("instantiation of & within itself", N, Gen_Unit);
- elsif Contains_Instance_Of (Gen_Unit, Current_Scope, Gen_Id) then
- Error_Msg_Node_2 := Current_Scope;
- Error_Msg_NE
- ("circular Instantiation: & instantiated in &!", N, Gen_Unit);
- Circularity_Detected := True;
-
elsif K = E_Procedure
and then Ekind (Gen_Unit) /= E_Generic_Procedure
then
@@ -3090,6 +3084,14 @@ package body Sem_Ch12 is
Set_Entity (Gen_Id, Gen_Unit);
end if;
+ if Contains_Instance_Of (Gen_Unit, Current_Scope, Gen_Id) then
+ Error_Msg_Node_2 := Current_Scope;
+ Error_Msg_NE
+ ("circular Instantiation: & instantiated in &!", N, Gen_Unit);
+ Circularity_Detected := True;
+ return;
+ end if;
+
if In_Extended_Main_Source_Unit (N) then
Set_Is_Instantiated (Gen_Unit);
Generate_Reference (Gen_Unit, N);