summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-11 23:01:00 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-11 23:01:00 +0000
commit56dfc8ca01203de3891348b9704beecd60bcf25f (patch)
tree11d29e57da04b303a82bfe15ecbabc386ef4ea29 /gcc/ada/sem_ch12.adb
parent95a5c38ed22b3b3c3d1d7746f32453035b116cf7 (diff)
downloadgcc-56dfc8ca01203de3891348b9704beecd60bcf25f.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47902 138bc75d-0d04-0410-961f-82ee72b054a4
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);