https://gcc.gnu.org/g:12028d7b97a89e6f160b43c70cbf660583039e9b

commit r15-2892-g12028d7b97a89e6f160b43c70cbf660583039e9b
Author: Arthur Cohen <arthur.co...@embecosm.com>
Date:   Fri Aug 2 11:18:51 2024 +0200

    borrowck: Avoid overloading issues on 32bit architectures
    
    On architectures where `size_t` is `unsigned int`, such as 32bit x86,
    we encounter an issue with `PlaceId` and `FreeRegion` being aliases to
    the same types. This poses an issue for overloading functions for these
    two types, such as `push_subset` in that case. This commit renames one
    of these `push_subset` functions to avoid the issue, but this should be
    fixed with a newtype pattern for these two types.
    
    gcc/rust/ChangeLog:
    
            * checks/errors/borrowck/rust-bir-fact-collector.h (points): Rename
            `push_subset(PlaceId, PlaceId)` to `push_subset_place(PlaceId, 
PlaceId)`

Diff:
---
 gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h 
b/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
index bb8fedaf3db7..6601c981779f 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
@@ -334,7 +334,7 @@ protected: // Main collection entry points (for different 
categories).
                expr.get_rhs () - 1, current_bb, current_stmt);
 
     issue_read_move (expr.get_rhs ());
-    push_subset (lhs, expr.get_rhs ());
+    push_place_subset (lhs, expr.get_rhs ());
   }
 
   void visit (const CallExpr &expr) override
@@ -660,7 +660,7 @@ protected: // Subset helpers.
       }
   }
 
-  void push_subset (PlaceId lhs, PlaceId rhs)
+  void push_place_subset (PlaceId lhs, PlaceId rhs)
   {
     auto &lhs_place = place_db[lhs];
     auto &rhs_place = place_db[rhs];

Reply via email to