[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-06-01 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

Aldy Hernandez  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Aldy Hernandez  ---
Fixed in trunk by:

https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571597.html

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-29 Thread ro at CeBiTec dot Uni-Bielefeld.DE via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #12 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #11 from Aldy Hernandez  ---
> Note, this is still broken so I am leaving the PR open.  I will address this
> next week.

FWIW, I can bootstrap both i386-pc-solaris2.11 and sparc-sun-solaris2.11
again with you temporary patch.  Thanks.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #11 from Aldy Hernandez  ---
Note, this is still broken so I am leaving the PR open.  I will address this
next week.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #10 from CVS Commits  ---
The master branch has been updated by Aldy Hernandez :

https://gcc.gnu.org/g:2364b584552208ce715fa4fd44c510b7e5210d1e

commit r12-1118-g2364b584552208ce715fa4fd44c510b7e5210d1e
Author: Aldy Hernandez 
Date:   Fri May 28 22:17:51 2021 +0200

Fix i686 bootstrap by temporarily disabling exporting of global ranges.

The patch converting evrp to the get_range_query(fun) API broke i686
bootstrap (commit 57bf37515).  The problem seems to be in a subsequent
pass that has more up-to-date global ranges.  I won't be able to look at
this until next week, so I am reverting the problematic bit of the
patch-- the exporting of global ranges once evrp finishes.  The use of
the new API remains.

Reverting the behavior shouldn't be a problem as we never used to export
global ranges from ranger.  This was new behavior in the patchset.

Tested on x86-64 Linux with a bootstrap and regtest, and on x86-32 with
only a bootstrap and the configure flags from the PR:

--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
--with-fpmath=sse --enable-languages=c,c++ --enable-cet i686-linux
--enable-bootstrap --with-fpmath=sse --disable-libcc1 --disable-libcilkrts
--disable-libsanitizer

gcc/ChangeLog:

PR tree-optimization/100787
* gimple-ssa-evrp.c: Disable exporting of global ranges.

gcc/testsuite/ChangeLog:

* gcc.dg/Wstringop-overflow-55.c:
* gcc.dg/pr80776-1.c:

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #9 from Aldy Hernandez  ---
This temporary fix resolves the bootstrap comparison on i686.  Does it also fix
it on sparc-32?

diff --git a/gcc/gimple-ssa-evrp.c b/gcc/gimple-ssa-evrp.c
index 118d10365a0..b40649b6a10 100644
--- a/gcc/gimple-ssa-evrp.c
+++ b/gcc/gimple-ssa-evrp.c
@@ -127,7 +127,7 @@ public:
 if (dump_file && (dump_flags & TDF_DETAILS))
   m_ranger->dump (dump_file);

-m_ranger->export_global_ranges ();
+//m_ranger->export_global_ranges ();
 disable_ranger (cfun);
   }

@@ -193,7 +193,7 @@ public:
 if (dump_file && (dump_flags & TDF_DETAILS))
   m_ranger->dump (dump_file);

-m_ranger->export_global_ranges ();
+//m_ranger->export_global_ranges ();
 disable_ranger (cfun);
   }

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread aldyh at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #7 from Jakub Jelinek  ---
Perhaps if EVRP is folding debug stmts it could first fold non-debug stmts (and
remember if there were any debug stmts) and only fold debug stmts afterwards,
either just by using caches and not adding anything to them (if they survive to
later passes), or just to make sure that the debug stmts don't affect non-debug
folding.

--- Comment #8 from Aldy Hernandez  ---
I'll work on it this weekend. If there's no patch by Monday morning, we can
revert the patch while I find a solution.

On Fri, May 28, 2021, 19:49 ro at gcc dot gnu.org 
wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787
>
> Rainer Orth  changed:
>
>What|Removed |Added
>
> 
>  Target|i686|i686, sparc
>  CC||ro at gcc dot gnu.org
>
> --- Comment #6 from Rainer Orth  ---
> It also affects 32-bit sparc (sparc-sun-solaris2.11), maybe other 32-bit
> targets, too?  Unless a quick fix is coming forward, I suspect it would be
> better
> to revert the patch instead of keeping bootstrap broken for days.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> You are on the CC list for the bug.
>
>

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #7 from Jakub Jelinek  ---
Perhaps if EVRP is folding debug stmts it could first fold non-debug stmts (and
remember if there were any debug stmts) and only fold debug stmts afterwards,
either just by using caches and not adding anything to them (if they survive to
later passes), or just to make sure that the debug stmts don't affect non-debug
folding.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread ro at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

Rainer Orth  changed:

   What|Removed |Added

 Target|i686|i686, sparc
 CC||ro at gcc dot gnu.org

--- Comment #6 from Rainer Orth  ---
It also affects 32-bit sparc (sparc-sun-solaris2.11), maybe other 32-bit
targets, too?  Unless a quick fix is coming forward, I suspect it would be
better
to revert the patch instead of keeping bootstrap broken for days.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-27 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

--- Comment #5 from H.J. Lu  ---
I have

[hjl@gnu-skx-1 gcc-32bit]$ ls /usr/local32/bin
addr2line  as   dwp  gprof  ld.bfd   nm   objdump  readelf  strings
ar c++filt  elfedit  ld ld.gold  objcopy  ranlib   size strip
[hjl@gnu-skx-1 gcc-32bit]$ 

and

PATH:=/usr/local32/bin:$(PATH)

in Makefile.  I can bootstrap i686-linux gcc with

$ CC="cc -m32 -fno-lto" CXX="g++ -m32 -fno-lto"
RUNTESTFLAGS="--target_board='unix'"
/export/gnu/import/git/sources/gcc/configure --enable-cet
--with-demangler-in-ld i686-linux --prefix=/usr/gcc-11.0.0-32bit
--with-local-prefix=/usr/local --enable-gnu-indirect-function
--enable-clocale=gnu --with-system-zlib --with-target-system-zlib
--with-fpmath=sse

on Linux/x86-64.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-27 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

Aldy Hernandez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-05-27
 Ever confirmed|0   |1

--- Comment #4 from Aldy Hernandez  ---
(In reply to Jakub Jelinek from comment #3)
> I'm using
> mkdir ~/hbin
> cat > ~/hbin/as <<\END
> #!/bin/sh
> exec /usr/bin/as --32 "$@"
> END
> cat > ~/hbin/g++ <<\END
> #!/bin/sh
> exec /usr/bin/g++ -m32 "$@"
> END
> cat > ~/hbin/gcc <<\END
> #!/bin/sh
> exec /usr/bin/gcc -m32 "$@"
> END
> cat > ~/hbin/ld <<\END
> #!/bin/sh
> case "$*" in
>   --version) cat <<\EOF
> GNU ld version 2.20.52.0.1-10.fc17 20100131
> Copyright 2012 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) a later version.
> This program has absolutely no warranty.
> EOF
>   exit 0;;
> esac
> exec /usr/bin/ld -m elf_i386 -L /usr/lib/ "$@"
> END
> chmod 755 ~/hbin/{as,g++,gcc,ld}
> 
> and then use
> PATH=~/hbin:$PATH i386 .../configure ...
> PATH=~/hbin:$PATH i386 make ...
> etc.

That is DIS-GUST-ING!

...and also works, thanks :).

Confirmed.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
I'm using
mkdir ~/hbin
cat > ~/hbin/as <<\END
#!/bin/sh
exec /usr/bin/as --32 "$@"
END
cat > ~/hbin/g++ <<\END
#!/bin/sh
exec /usr/bin/g++ -m32 "$@"
END
cat > ~/hbin/gcc <<\END
#!/bin/sh
exec /usr/bin/gcc -m32 "$@"
END
cat > ~/hbin/ld <<\END
#!/bin/sh
case "$*" in
  --version) cat <<\EOF
GNU ld version 2.20.52.0.1-10.fc17 20100131
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
EOF
  exit 0;;
esac
exec /usr/bin/ld -m elf_i386 -L /usr/lib/ "$@"
END
chmod 755 ~/hbin/{as,g++,gcc,ld}

and then use
PATH=~/hbin:$PATH i386 .../configure ...
PATH=~/hbin:$PATH i386 make ...
etc.

[Bug tree-optimization/100787] [12 Regression] Bootstrap failure caused by r12-1077

2021-05-27 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100787

Aldy Hernandez  changed:

   What|Removed |Added

 CC||aldyh at gcc dot gnu.org

--- Comment #2 from Aldy Hernandez  ---
I'm doing the following on an x86-64 Linux box, as I don't have access to an
i686 system:

~/src/clean/configure --enable-clocale=gnu --with-system-zlib
--with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++ --enable-cet
i686-linux --enable-bootstrap --with-fpmath=sse --disable-libcc1
--disable-libcilkrts --disable-libsanitizer

make -jN

/usr/bin/ld: /home/aldyh/bld/t/./gcc/liblto_plugin.so: error loading plugin:
/home/aldyh/bld/t/./gcc/liblto_plugin.so: wrong ELF class: ELFCLASS32
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:995: libgcc_s.so] Error 1
make[3]: Leaving directory '/opt/notnfs/aldyh/bld/t/i686-linux/libgcc'
make[2]: *** [Makefile:19008: all-stage2-target-libgcc] Error 2
make[2]: Leaving directory '/opt/notnfs/aldyh/bld/t'
make[1]: *** [Makefile:23280: stage2-bubble] Error 2

Is there a way to reproduce this on an x86-64 system?