[Bug tree-optimization/123351] [14/15 regression] mingw32 cross compile determinism is architecture dependent since r14-5628-g53ba8d669550d3 (r14-5679-g1d82fc2e6824bf)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 15 06:05:00 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123351
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2d7099faa5c59b871e3027268d70a8a46d892824
commit r14-12384-g2d7099faa5c59b871e3027268d70a8a46d892824
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Jan 6 08:36:20 2026 +0100
tree-object-size: Deterministic SSA generation [PR123351]
The order of evaluation of function arguments is unspecified in C++.
The function object_sizes_set_temp called object_sizes_set with two
calls to make_ssa_name() as arguments. Since make_ssa_name() has the
side effect of incrementing the global SSA version counter, different
architectures of the same compiler evaluated these calls in different
orders.
This resulted in non-deterministic SSA version numbering between
x86_64 and aarch64 hosts during cross-compilation, leading to
divergent object files.
Sequencing the calls into separate statements ensures deterministic
evaluation order.
2026-01-06 Jakub Jelinek <jakub@redhat.com>
Marco Falke <falke.marco@gmail.com>
PR tree-optimization/123351
* tree-object-size.cc (object_sizes_set_temp): Separate calls to
make_ssa_name to ensure deterministic execution order.
(cherry picked from commit c6085ca0ed4cef3bcf4eb382cb71e44219c10f6e)
More information about the Gcc-bugs
mailing list