]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Fix run time failures when compiled with -m32
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 15 Feb 2026 23:30:39 +0000 (15:30 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Feb 2026 17:18:25 +0000 (09:18 -0800)
PR fortran/124080

libgfortran/ChangeLog:

* caf/shmem/hashmap.c (hash): Use size_t instead of
uint64.
(hmiadd): Use size_t instead of ssize_t.
(scan_inside_lookahead): Likewise.
(scan_empty): Likewise.

libgfortran/caf/shmem/hashmap.c

index e17d6dd2dcab4a19f53de1cf81d9039560c57a82..1dd3980186100acc74ea9a6446dcf79111e51b19 100644 (file)
@@ -45,8 +45,8 @@ typedef struct
 
 /* 64 bit to 64 bit hash function.  */
 
-static inline uint64_t
-hash (uint64_t key)
+static inline size_t
+hash (size_t key)
 {
   key ^= (key >> 30);
   key *= 0xbf58476d1ce4e5b9ul;
@@ -83,7 +83,7 @@ hmiadd (hashmap *hm, size_t s, ssize_t o)
 
 /* Get the expected offset for entry id.  */
 
-static inline ssize_t
+static inline size_t
 get_expected_offset (hashmap *hm, memid id)
 {
   return hash (id) >> (VOIDP_BITS - hm->s->bitnum);
@@ -115,7 +115,7 @@ hashmap_init_supervisor (hashmap *hm, hashmap_shared *hs, allocator *a)
    the expected position and the maximum lookahead.  */
 
 static ssize_t
-scan_inside_lookahead (hashmap *hm, ssize_t expected_off, memid id)
+scan_inside_lookahead (hashmap *hm, size_t expected_off, memid id)
 {
   ssize_t lookahead;
   hashmap_entry *data;
@@ -135,7 +135,7 @@ scan_inside_lookahead (hashmap *hm, ssize_t expected_off, memid id)
    to the expected position.  */
 
 static ssize_t
-scan_empty (hashmap *hm, ssize_t expected_off)
+scan_empty (hashmap *hm, size_t expected_off)
 {
   hashmap_entry *data;