* [Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
@ 2023-10-27 12:54 ` slyfox at gcc dot gnu.org
2023-10-27 13:11 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-10-27 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #1 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
`diffoscope` says there is a difference in generated code in one of the
functions:
$ strip --strip-debug stage2-gcc-ira-build.o stage3-gcc-ira-build.o
$ diffoscope stage2-gcc-ira-build.o stage3-gcc-ira-build.o
│ add $0x10,%esp
│ mov $0x1,%edx
│ mov %eax,0x4(%esi)
│ movl $0x0,(%eax)
│ movl $0x0,0x38(%esi)
│ - jmp 363b <ira_allocate_object_conflicts(ira_object*, int)+0x5b>
│ - lea 0x0(%esi,%eiz,1),%esi
│ - lea 0x0(%esi),%esi
│ + jmp 363c <ira_allocate_object_conflicts(ira_object*, int)+0x5c>
│ + xchg %ax,%ax
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
2023-10-27 12:54 ` [Bug bootstrap/112107] " slyfox at gcc dot gnu.org
@ 2023-10-27 13:11 ` rguenth at gcc dot gnu.org
2023-10-27 13:43 ` slyfox at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-27 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |i686-unknown-linux-gnu
Build| |i686-unknown-linux-gnu
Keywords| |needs-bisection
Target Milestone|--- |14.0
Host| |i686-unknown-linux-gnu
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
2023-10-27 12:54 ` [Bug bootstrap/112107] " slyfox at gcc dot gnu.org
2023-10-27 13:11 ` rguenth at gcc dot gnu.org
@ 2023-10-27 13:43 ` slyfox at gcc dot gnu.org
2023-10-27 13:48 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-10-27 13:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Reduced ira-build.cc down to the following:
// $ cat pp.cc.cc
typedef struct ira_object *ira_object_t;
struct ira_object {
void *conflicts_array;
int min, max;
};
void *ira_allocate(int);
int ira_conflict_vector_profitable_p_nbytes;
void ira_conflict_vector_profitable_p(ira_object_t obj) {
int max(obj->max);
if (max < obj->min)
ira_conflict_vector_profitable_p_nbytes = max - obj->min;
}
void ira_allocate_object_conflicts(ira_object_t obj) {
ira_conflict_vector_profitable_p(obj);
int size((obj->max - obj->min) * sizeof 0);
obj->conflicts_array = ira_allocate(size);
}
Reproducer:
# cat trigger.bash
#!/usr/bin/env bash
f() {
stage3-gcc/xg++ -Bstage3-gcc -nostdinc++ -fno-PIE -g -O2 -fchecking=1
-DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -fno-PIE -c
pp.cc.cc -o pp.o -Wall "$@"
strip --strip-debug pp.o
sha1sum pp.o
}
[[ "$(f)" == "$(f -gtoggle)" ]] && echo EQUAL || echo DIFF
Running:
$ ./trigger.bash
DIFF
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (2 preceding siblings ...)
2023-10-27 13:43 ` slyfox at gcc dot gnu.org
@ 2023-10-27 13:48 ` rguenth at gcc dot gnu.org
2023-10-27 13:58 ` [Bug rtl-optimization/112107] " pinskia at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-27 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-10-27
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
> ./xg++ -B. -c -g -O2 -fno-exceptions -fno-rtti t.ii -fcompare-debug -m32
xg++: error: t.ii: '-fcompare-debug' failure (length)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (3 preceding siblings ...)
2023-10-27 13:48 ` rguenth at gcc dot gnu.org
@ 2023-10-27 13:58 ` pinskia at gcc dot gnu.org
2023-10-27 16:32 ` slyfox at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-27 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ra
Component|bootstrap |rtl-optimization
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like the first difference comes from reload (LRA) .
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (4 preceding siblings ...)
2023-10-27 13:58 ` [Bug rtl-optimization/112107] " pinskia at gcc dot gnu.org
@ 2023-10-27 16:32 ` slyfox at gcc dot gnu.org
2023-10-27 16:33 ` slyfox at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-10-27 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vmakarov at gcc dot gnu.org,
| |vmakarov at redhat dot com
--- Comment #5 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Bisected down to r14-4943-g8d2130a4e5ce36 "[RA]: Modfify cost calculation for
dealing with equivalences"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (5 preceding siblings ...)
2023-10-27 16:32 ` slyfox at gcc dot gnu.org
@ 2023-10-27 16:33 ` slyfox at gcc dot gnu.org
2023-10-27 18:07 ` vmakarov at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-10-27 16:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #6 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
(In reply to Sergei Trofimovich from comment #5)
> Bisected down to r14-4943-g8d2130a4e5ce36 "[RA]: Modfify cost calculation
> for dealing with equivalences"
Sorry, pasted wrong hash. That should be a r14-4944-gf55cdce3f8dd85 "[RA]:
Modfify cost calculation for dealing with equivalences"
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (6 preceding siblings ...)
2023-10-27 16:33 ` slyfox at gcc dot gnu.org
@ 2023-10-27 18:07 ` vmakarov at gcc dot gnu.org
2023-10-27 18:11 ` slyfox at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2023-10-27 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Sorry for inconvenience because of my patch.
I reproduced the bug with the reproducer using stage1 gcc although strangely
the standard bootstrap works ok for me on i686 debian.
I think I know the reason for this bug. I'll fix it today.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (7 preceding siblings ...)
2023-10-27 18:07 ` vmakarov at gcc dot gnu.org
@ 2023-10-27 18:11 ` slyfox at gcc dot gnu.org
2023-10-27 18:54 ` vmakarov at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-10-27 18:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #8 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
bootstrap with default options did not fail for me either. I had to use
--enable-checking=release to trigger the failure. I wonder if it exposes the
failure for you as well.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (8 preceding siblings ...)
2023-10-27 18:11 ` slyfox at gcc dot gnu.org
@ 2023-10-27 18:54 ` vmakarov at gcc dot gnu.org
2023-10-27 19:12 ` cvs-commit at gcc dot gnu.org
2023-10-27 21:11 ` [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs since r14-4944-gf55cdce3f8dd85 slyfox at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2023-10-27 18:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #9 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Sergei Trofimovich from comment #8)
> bootstrap with default options did not fail for me either. I had to use
> --enable-checking=release to trigger the failure. I wonder if it exposes the
> failure for you as well.
Yes, with --enable-checking=release I managed to reproduce a failure on clean
bootstrap.
BTW, thank you for the reproducer. It was easier to start from it.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (9 preceding siblings ...)
2023-10-27 18:54 ` vmakarov at gcc dot gnu.org
@ 2023-10-27 19:12 ` cvs-commit at gcc dot gnu.org
2023-10-27 21:11 ` [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs since r14-4944-gf55cdce3f8dd85 slyfox at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-27 19:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:
https://gcc.gnu.org/g:4d3d2cdb574488223d023b590c3a34ddd93f4dae
commit r14-4986-g4d3d2cdb574488223d023b590c3a34ddd93f4dae
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date: Fri Oct 27 14:50:40 2023 -0400
[RA]: Fixing i686 bootstrap failure because of pushing the equivalence
patch
GCC with my recent patch improving cost calculation for pseudos with
equivalence may generate different code with and without debug info
and as the result i686 bootstrap fails on i686. The patch fixes this
bug.
gcc/ChangeLog:
PR rtl-optimization/112107
* ira-costs.cc: (calculate_equiv_gains): Use NONDEBUG_INSN_P
instead of INSN_P.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug rtl-optimization/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs since r14-4944-gf55cdce3f8dd85
2023-10-27 12:38 [Bug bootstrap/112107] New: [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs slyfox at gcc dot gnu.org
` (10 preceding siblings ...)
2023-10-27 19:12 ` cvs-commit at gcc dot gnu.org
@ 2023-10-27 21:11 ` slyfox at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-10-27 21:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
The change fixed bootstrap for me. Thank you!
Let's declare it fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread