aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-12-16 15:18:13 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-04-29 04:00:47 -0400
commit224ae1c7737a7ea307cd80475351fdb5ea25b641 (patch)
treea36587b3d7ad51b5a18be54b46689751eee984e8 /gcc
parentf64998fed6bc3b9a9af8bdb890bd214828f5a508 (diff)
downloadgcc-224ae1c7737a7ea307cd80475351fdb5ea25b641.zip
gcc-224ae1c7737a7ea307cd80475351fdb5ea25b641.tar.gz
gcc-224ae1c7737a7ea307cd80475351fdb5ea25b641.tar.bz2
[Ada] Fix internal consistency error with Duration and 32-bit target file
gcc/ada/ * gnat1drv.adb (Adjust_Global_Switches): Force a 32-bit Duration type if the maximum integer size is lower than 64 bits.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/gnat1drv.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 0318194..4bdac5e 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -819,6 +819,12 @@ procedure Gnat1drv is
Ttypes.Standard_Long_Long_Integer_Size;
end if;
+ -- Forcefully use a 32-bit Duration with only 32-bit integer types
+
+ if Ttypes.System_Max_Integer_Size < 64 then
+ Targparm.Duration_32_Bits_On_Target := True;
+ end if;
+
-- Finally capture adjusted value of Suppress_Options as the initial
-- value for Scope_Suppress, which will be modified as we move from
-- scope to scope (by Suppress/Unsuppress/Overflow_Checks pragmas).