[multiple changes]
[gcc.git] / gcc / ada / sem_ch6.adb
index 88e277344838cc787d9d161b1d7394344557efb2..8940d82570472b1106d236d42b79d2278a72a43a 100644 (file)
@@ -9946,7 +9946,9 @@ package body Sem_Ch6 is
                         --  (Note that the same is done for controlling access
                         --  parameter cases in function Access_Definition.)
 
-                        Set_Has_Delayed_Freeze (Current_Scope);
+                        if not Is_Thunk (Current_Scope) then
+                           Set_Has_Delayed_Freeze (Current_Scope);
+                        end if;
                      end if;
                   end if;