diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-03-30 23:12:51 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-20 09:47:06 +0200 |
commit | 49eb34ea61c6e8fbb10d3a36484cbf5468580fba (patch) | |
tree | 117525431d5610ceb9de71d055bbe4cc834c2c91 /gcc/ada/sem_ch10.adb | |
parent | bfa743ddc9fd1850a7cc282afe5f3101b544ac64 (diff) | |
download | gcc-49eb34ea61c6e8fbb10d3a36484cbf5468580fba.zip gcc-49eb34ea61c6e8fbb10d3a36484cbf5468580fba.tar.gz gcc-49eb34ea61c6e8fbb10d3a36484cbf5468580fba.tar.bz2 |
ada: Add direct workaround for limitations of RTSfind mechanism
This adds a direct workaround for the spurious compilation errors caused by
the presence of preconditions/postconditions in the Interfaces.C unit, which
trip on limitations of the RTSfind mechanism when it comes to visibility, as
well as removes an indirect workaround that was added very recently.
These errors were first triggered in the context of finalization and worked
around by preloading the System.Finalization_Primitives unit. Now they also
appear in the context of tasking, and it turns out that the preloading trick
does not work for separate compilation units.
gcc/ada/
* exp_ch7.ads (Preload_Finalization_Collection): Delete.
* exp_ch7.adb (Allows_Finalization_Collection): Revert change.
(Preload_Finalization_Collection): Delete.
* opt.ads (Interface_Seen): Likewise.
* scng.adb (Scan): Revert latest change.
* sem_ch10.adb: Remove clause for Exp_Ch7.
(Analyze_Compilation_Unit): Revert latest change.
* libgnat/i-c.ads: Use a fully qualified name for the standard "+"
operator in the preconditons/postconditions of subprograms.
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r-- | gcc/ada/sem_ch10.adb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 82b4e1c..73e5388 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -31,7 +31,6 @@ with Einfo; use Einfo; with Einfo.Entities; use Einfo.Entities; with Einfo.Utils; use Einfo.Utils; with Errout; use Errout; -with Exp_Ch7; with Exp_Disp; use Exp_Disp; with Exp_Put_Image; with Exp_Util; use Exp_Util; @@ -926,8 +925,6 @@ package body Sem_Ch10 is Set_Context_Pending (N, False); - Exp_Ch7.Preload_Finalization_Collection (N); - -- If the unit is a package body, the spec is already loaded and must be -- analyzed first, before we analyze the body. |