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.