aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 15edfb6..e8c47d7 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1057,7 +1057,11 @@ package body Lib.Xref is
XE : Xref_Entry renames Xrefs.Table (F);
type M is mod 2**32;
- H : constant M := M'Mod (XE.Key.Ent) + 2**7 * M'Mod (XE.Key.Loc);
+
+ H : constant M := M (XE.Key.Ent) + 2**7 * M (abs XE.Key.Loc);
+ -- We can't use M'Mod above, because it prevents bootstrapping with
+ -- older compilers. Loc can be negative, so we do "abs" before
+ -- converting.
begin
return Header_Num (H mod Num_Buckets);
end Hash;