[Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs

2023-10-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-10-27
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
Confirmed.

> ./xg++ -B. -c -g -O2 -fno-exceptions -fno-rtti t.ii -fcompare-debug -m32
xg++: error: t.ii: '-fcompare-debug' failure (length)

[Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs

2023-10-27 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107

--- Comment #2 from Sergei Trofimovich  ---
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

[Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs

2023-10-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107

Richard Biener  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

[Bug bootstrap/112107] [14 Regression] bootstrap failure on i686-linux: gcc/ira-build.o differs

2023-10-27 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112107

--- Comment #1 from Sergei Trofimovich  ---
`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)
│ - jmp363b 
│ - lea0x0(%esi,%eiz,1),%esi
│ - lea0x0(%esi),%esi
│ + jmp363c 
│ + xchg   %ax,%ax