aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-03-29 09:01:23 -0700
committerIan Lance Taylor <iant@golang.org>2023-03-29 09:01:23 -0700
commit6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced (patch)
tree1deecdcfbf185c7044bc861d0ace51285c96cb62 /gcc/ada/lib-xref.adb
parent795cffe109e28b248a54b8ee583cbae48368c2a7 (diff)
parentaa8f4242efc99f24de73c59d53996f28db28c13f (diff)
downloadgcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.zip
gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.tar.gz
gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.tar.bz2
Merge from trunk revision aa8f4242efc99f24de73c59d53996f28db28c13f.
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 043444c..b45c601 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2022, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2023, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -47,6 +47,7 @@ with Snames; use Snames;
with Stringt; use Stringt;
with Stand; use Stand;
with Table; use Table;
+with Warnsw; use Warnsw;
with GNAT.Heap_Sort_G;
with GNAT.HTable;
@@ -775,7 +776,7 @@ package body Lib.Xref is
Set_Referenced_As_LHS (E, False);
-- For OUT parameter not covered by the above cases, we simply
- -- regard it as a non-reference.
+ -- regard it as a reference.
else
Set_Referenced_As_Out_Parameter (E);
@@ -1271,10 +1272,10 @@ package body Lib.Xref is
XE : Xref_Entry renames Xrefs.Table (F);
type M is mod 2**32;
- H : constant M := M (XE.Key.Ent) + 2 ** 7 * M (abs XE.Key.Loc);
+ H : constant M := 3 * M (XE.Key.Ent) + 5 * M (abs XE.Key.Loc);
-- It would be more natural to write:
--
- -- H : constant M := M'Mod (XE.Key.Ent) + 2**7 * M'Mod (XE.Key.Loc);
+ -- H : constant M := 3 * M'Mod (XE.Key.Ent) + 5 * M'Mod (XE.Key.Loc);
--
-- But we can't use M'Mod, because it prevents bootstrapping with older
-- compilers. Loc can be negative, so we do "abs" before converting.