[Bug rust/116187] -Wuninitialized warnings in libgrust/libproc_macro_internal/literal.cc

2024-08-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116187

Richard Biener  changed:

   What|Removed |Added

   Keywords||internal-improvement

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/116192] New: [15 regression] 32-bit rust build fails

2024-08-02 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116192

Bug ID: 116192
   Summary: [15 regression] 32-bit rust build fails
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rust
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ro at gcc dot gnu.org
CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org
  Target Milestone: ---
Target: i386-pc-solaris2.11, sparc-sun-solaris2.11,
i686-pc-linux-gnu

The recent gigantic rust import broke the 32-bit rust build everywhere:

* There are several instances where size_t args are printed using %ld, e.g.

In file included from /vol/gcc/src/hg/master/local/gcc/rust/ast/rust-ast.h:27,
 from
/vol/gcc/src/hg/master/local/gcc/rust/hir/tree/rust-hir.h:22,
 from
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-borrow-checker.h:22,
 from
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-borrow-checker.cc:19:
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-bir-builder.h:
In member function ‘void
Rust::BIR::Builder::handle_lifetime_param_constraints(const
Rust::TyTy::RegionConstraints&)’:
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-bir-builder.h:94:21:
error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has
type ‘unsigned int’ [-Werror=format=]
   94 | rust_debug ("\t\t %ld: %ld", last_bound.first,
last_bound.second);
  | ^~~  
  | |
  |  

  Given that %z cannot yet be assumed, those should be printed as %lu and
  the args cast to unsigned long.  This should be an unsigned format and type
  to match the signedness of size_t.

* There's an overload issue with PlaceId vs. FreeRegion:

In file included from
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-borrow-checker.cc:23:
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h:
At global scope:
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h:663:8:
error: ‘void Rust::BIR::FactCollector::push_subset(Rust::BIR::PlaceId,
Rust::BIR::PlaceId)’ cannot be overloaded with ‘void
Rust::BIR::FactCollector::push_subset(Rust::FreeRegion, Rust::FreeRegion)’
  663 |   void push_subset (PlaceId lhs, PlaceId rhs)
  |^~~
/vol/gcc/src/hg/master/local/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h:622:8:
note: previous declaration ‘void
Rust::BIR::FactCollector::push_subset(Rust::FreeRegion, Rust::FreeRegion)’
  622 |   void push_subset (FreeRegion lhs, FreeRegion rhs)
  |^~~

  PlaceId is uint32_t while FreeRegion is size_t (also uint32_t).

The attached patch fixes the format issues, but I've no idea what to do about
the overload one.

Given that this isn't the first time that rust broke 32-bit targets, it would
be very helpful to try at least one 32-bit build before commit.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/116192] [15 regression] 32-bit rust build fails

2024-08-02 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116192

--- Comment #1 from Rainer Orth  ---
Created attachment 58806
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58806&action=edit
partial patch

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/116192] [15 regression] 32-bit rust build fails

2024-08-02 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116192

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |15.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/116192] [15 regression] 32-bit rust build fails

2024-08-02 Thread cohenarthur at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116192

Arthur Cohen  changed:

   What|Removed |Added

 CC||cohenarthur at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |cohenarthur at gcc dot 
gnu.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/116192] [15 regression] 32-bit rust build fails

2024-08-02 Thread cohenarthur at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116192

Arthur Cohen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2024-08-02
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug rust/116192] [15 regression] 32-bit rust build fails

2024-08-02 Thread cohenarthur at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116192

--- Comment #2 from Arthur Cohen  ---
Hi Rainer,

Thank you for the report. We've fixed this in our development repository and
will upstream the commits soon. I am looking at adding a 32-bit CI build so
that this does not happen again.

Best,

Arthur

-- 
You are receiving this mail because:
You are on the CC list for the bug.