public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater
@ 2021-10-19 14:43 herrtimson at yahoo dot de
  2021-10-19 14:43 ` [Bug other/102842] " herrtimson at yahoo dot de
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-19 14:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

            Bug ID: 102842
           Summary: [10 Regression] ICE in cselib_record_set at 02 or
                    greater
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: herrtimson at yahoo dot de
  Target Milestone: ---

Created attachment 51634
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51634&action=edit
compressed build log

I'm hitting this when compiling firefox nightly with --enable-jxl, using
gcc-10.3.0 cross-compiler with amd64 host and armv7a target. Affected are -02
and -03, -01 is fine. It is unknown wether the error is cross compile specific,
my rpi2 device doesn't have near enough ram to compile firefox with native gcc
on it. Anyway, here is the error message: 

23:39.63       |              ^~~~~~
23:41.47 during RTL pass: postreload
23:41.47
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/third_party/jpeg-xl/lib/jxl/dec_reconstruct.cc:
In function 'jxl::Status jxl::FinalizeImageRect(jxl::Image3F*, const
jxl::Rect&, const std::vector<std::pair<jxl::Plane<float>*, jxl::Rect> >&,
jxl::PassesDecoderState*, size_t, jxl::ImageBundle*, const jxl::Rect&)':
23:41.47
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/third_party/jpeg-xl/lib/jxl/dec_reconstruct.cc:1080:1:
internal compiler error: in cselib_record_set, at cselib.c:2614
23:41.47  1080 | }
23:41.47       | ^
23:41.80 In file included from
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/dist/include/nsTArray.h:3331,
23:41.80                  from
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/netwerk/cache2/CacheIOThread.h:11,
23:41.80                  from
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/netwerk/cache2/CacheFileIOManager.h:8,
23


the souce code in question can be accessed via this link:
https://github.com/mozilla/gecko-dev/blob/master/third_party/jpeg-xl/lib/jxl/dec_reconstruct.cc#L1080

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug other/102842] [10 Regression] ICE in cselib_record_set at 02 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
@ 2021-10-19 14:43 ` herrtimson at yahoo dot de
  2021-10-19 14:50 ` marxin at gcc dot gnu.org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-19 14:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #1 from tt_1 <herrtimson at yahoo dot de> ---
Created attachment 51635
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51635&action=edit
preprocessed source

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug other/102842] [10 Regression] ICE in cselib_record_set at 02 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
  2021-10-19 14:43 ` [Bug other/102842] " herrtimson at yahoo dot de
@ 2021-10-19 14:50 ` marxin at gcc dot gnu.org
  2021-10-19 14:55 ` herrtimson at yahoo dot de
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-19 14:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-10-19
     Ever confirmed|0                           |1
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |WAITING

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please provide compiler options used for the compilation.
And gcc -v output?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug other/102842] [10 Regression] ICE in cselib_record_set at 02 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
  2021-10-19 14:43 ` [Bug other/102842] " herrtimson at yahoo dot de
  2021-10-19 14:50 ` marxin at gcc dot gnu.org
@ 2021-10-19 14:55 ` herrtimson at yahoo dot de
  2021-10-19 18:36 ` [Bug rtl-optimization/102842] " pinskia at gcc dot gnu.org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-19 14:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #3 from tt_1 <herrtimson at yahoo dot de> ---
sure I can provide happily gcc -v of host: 

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/10.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/10.3.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.3.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.3.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include/g++-v10
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/10.3.0/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 10.3.0-r2 p3'
--disable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--disable-systemtap --enable-vtable-verify --without-zstd --enable-lto
--without-isl --disable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.0 (Gentoo 10.3.0-r2 p3) 

and cross-gcc: 

LANG=C armv7a-unknown-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=armv7a-unknown-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7a-unknown-linux-gnueabihf/10.3.0/lto-wrapper
Target: armv7a-unknown-linux-gnueabihf
Configured with:
/var/tmp/portage/cross-armv7a-unknown-linux-gnueabihf/gcc-10.3.0-r2/work/gcc-10.3.0/configure
--host=x86_64-pc-linux-gnu --target=armv7a-unknown-linux-gnueabihf
--build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/armv7a-unknown-linux-gnueabihf/gcc-bin/10.3.0
--includedir=/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.3.0/include
--datadir=/usr/share/gcc-data/armv7a-unknown-linux-gnueabihf/10.3.0
--mandir=/usr/share/gcc-data/armv7a-unknown-linux-gnueabihf/10.3.0/man
--infodir=/usr/share/gcc-data/armv7a-unknown-linux-gnueabihf/10.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.3.0/include/g++-v10
--with-python-dir=/share/gcc-data/armv7a-unknown-linux-gnueabihf/10.3.0/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 10.3.0-r2 p3'
--disable-esp --enable-libstdcxx-time --enable-poison-system-directories
--with-sysroot=/usr/armv7a-unknown-linux-gnueabihf --disable-bootstrap
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --with-float=hard --with-arch=armv7-a --with-float=hard
--with-fpu=vfpv3-d16 --enable-libgomp --disable-libssp --disable-libada
--disable-systemtap --disable-vtable-verify --disable-libvtv --without-zstd
--enable-lto --without-isl --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.0 (Gentoo 10.3.0-r2 p3) 


I am not sure what you mean by asking for compiler options, but I can give you
the exact command that fails, it should have all details in it: 

/usr/bin/armv7a-unknown-linux-gnueabihf-g++ --sysroot
/usr/armv7a-unknown-linux-gnueabihf -std=gnu++17 -o dec_reconstruct.o -c 
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/dist/stl_wrappers
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/dist/system_wrappers
-include
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/config/gcc_hidden.h
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1
-DTRIMMED=1 -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=0
-DJPEGXL_PATCH_VERSION=0 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL
-DSTATIC_EXPORTABLE_JS_API
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/media/libjxl
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/media/libjxl
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/media/libjxl/include
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/third_party/jpeg-xl
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/third_party/jpeg-xl/lib/include
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/dist/include
-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nspr
-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nss
-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/nspr
-I/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/dist/include/nss
-I/usr/armv7a-unknown-linux-gnueabihf/usr/include
-I/usr/armv7a-unknown-linux-gnueabihf/usr/include/pixman-1
-I/usr/armv7a-unknown-linux-gnueabihf/usr/include -DMOZILLA_CLIENT -include
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox_build/mozilla-config.h
-Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare
-Wtype-limits -Wunreachable-code -Wno-invalid-offsetof -Wc++2a-compat
-Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized
-Wno-error=deprecated-declarations -Wno-error=array-bounds
-Wno-error=coverage-mismatch -Wno-error=free-nonheap-object
-Wno-multistatement-macros -Wno-error=class-memaccess
-Wno-error=deprecated-copy -Wno-error=unused-but-set-variable -Wformat
-Wformat-security -Wformat-overflow=2 -Wno-psabi -fno-sized-deallocation
-fno-aligned-new -pipe -fomit-frame-pointer -fno-tree-loop-vectorize -mthumb
-mno-thumb-interwork -mfpu=neon -mfloat-abi=hard -fno-exceptions
-fno-strict-aliasing -funwind-tables -fPIC -fno-rtti -ffunction-sections
-fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -O2
-fno-omit-frame-pointer -funwind-tables  -MD -MP -MF .deps/dec_reconstruct.o.pp
 -fdiagnostics-color 
/usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-95.0/work/firefox-95.0/third_party/jpeg-xl/lib/jxl/dec_reconstruct.cc

If I decrease optimization to -O1 it passes, -O2 and -O3 give the ICE

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at 02 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (2 preceding siblings ...)
  2021-10-19 14:55 ` herrtimson at yahoo dot de
@ 2021-10-19 18:36 ` pinskia at gcc dot gnu.org
  2021-10-19 18:43 ` [Bug rtl-optimization/102842] [10/11/12 " pinskia at gcc dot gnu.org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-19 18:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
          Component|other                       |rtl-optimization
     Ever confirmed|1                           |0
           Keywords|                            |ice-on-valid-code

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10/11/12 Regression] ICE in cselib_record_set at 02 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (3 preceding siblings ...)
  2021-10-19 18:36 ` [Bug rtl-optimization/102842] " pinskia at gcc dot gnu.org
@ 2021-10-19 18:43 ` pinskia at gcc dot gnu.org
  2021-10-20  8:28 ` [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 " marxin at gcc dot gnu.org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-19 18:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10 Regression] ICE in      |[10/11/12 Regression] ICE
                   |cselib_record_set at 02 or  |in cselib_record_set at 02
                   |greater                     |or greater
   Target Milestone|---                         |10.4

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (4 preceding siblings ...)
  2021-10-19 18:43 ` [Bug rtl-optimization/102842] [10/11/12 " pinskia at gcc dot gnu.org
@ 2021-10-20  8:28 ` marxin at gcc dot gnu.org
  2021-10-20 10:46 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-20  8:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2021-10-19 00:00:00         |2021-10-20
             Status|UNCONFIRMED                 |NEW
            Summary|[10/11/12 Regression] ICE   |[10 Regression] ICE in
                   |in cselib_record_set at -O2 |cselib_record_set at -O2 or
                   |or greater                  |greater
     Ever confirmed|0                           |1

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
All right, now I can reproduce it with the cross compiler. Apparently, it's
fixed with r11-209-g74dc179a6da33cd00f6d4a93fbb97dc84f610126.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (5 preceding siblings ...)
  2021-10-20  8:28 ` [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 " marxin at gcc dot gnu.org
@ 2021-10-20 10:46 ` marxin at gcc dot gnu.org
  2021-10-20 10:46 ` marxin at gcc dot gnu.org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-20 10:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
And reduced test-case looks like this:

struct Plane {
  using T = float;
  T *Row();
};
using ImageF = Plane;
long long Mirror_x;
struct EnsurePaddingInPlaceRowByRow {
  void Process() {
    switch (strategy_) {
    case kSlow:
      float *row = img_.Row();
      long long xsize = x1_;
      while (Mirror_x >= xsize)
        if (Mirror_x)
          Mirror_x = 2 * xsize - 1;
      *row = Mirror_x;
    }
  }
  ImageF img_;
  unsigned x1_;
  enum { kSlow } strategy_;
};
void FinalizeImageRect() {
  EnsurePaddingInPlaceRowByRow ensure_padding;
  ensure_padding.Process();
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (6 preceding siblings ...)
  2021-10-20 10:46 ` marxin at gcc dot gnu.org
@ 2021-10-20 10:46 ` marxin at gcc dot gnu.org
  2021-10-20 11:32 ` herrtimson at yahoo dot de
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-20 10:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Closing as fixed.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (7 preceding siblings ...)
  2021-10-20 10:46 ` marxin at gcc dot gnu.org
@ 2021-10-20 11:32 ` herrtimson at yahoo dot de
  2021-10-20 12:19 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-20 11:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #7 from tt_1 <herrtimson at yahoo dot de> ---
hey, thanks for the messages. I just finished to compile firefox with patched
cross-gcc-10.3.0, the ice is fixed with the patch from
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=74dc179a6da33cd00f6d4a93fbb97dc84f610126
applied to it. 

So can you please tell me if this has already been backported to the gcc-10
branch? I just browsed through the git dirs, and I'm not certain. Also no hint
in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92807 that its been fixed for
the gcc-10 branch. 

Is it queued to be backported? Sorry if I'm asking dumb questions, I'm just a
regular user, not a gentoo dev.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (8 preceding siblings ...)
  2021-10-20 11:32 ` herrtimson at yahoo dot de
@ 2021-10-20 12:19 ` marxin at gcc dot gnu.org
  2021-10-20 15:29 ` herrtimson at yahoo dot de
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-20 12:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to tt_1 from comment #7)
> hey, thanks for the messages. I just finished to compile firefox with
> patched cross-gcc-10.3.0, the ice is fixed with the patch from
> https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;
> h=74dc179a6da33cd00f6d4a93fbb97dc84f610126 applied to it. 

Great!

> 
> So can you please tell me if this has already been backported to the gcc-10
> branch?

No, it wasn't.

> I just browsed through the git dirs, and I'm not certain. Also no
> hint in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92807 that its been
> fixed for the gcc-10 branch. 
> 
> Is it queued to be backported?

Apparently, the commit does not fix a regression so the author decided not to
backport it.

So I would recommend updating to GCC 11.2.0, which is the latest support
release.

> Sorry if I'm asking dumb questions, I'm just
> a regular user, not a gentoo dev.

No, your questions are very reasonable and we thank you reporting the issue you
deal with.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (9 preceding siblings ...)
  2021-10-20 12:19 ` marxin at gcc dot gnu.org
@ 2021-10-20 15:29 ` herrtimson at yahoo dot de
  2021-10-21  7:25 ` marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-20 15:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #9 from tt_1 <herrtimson at yahoo dot de> ---
So, I did a little bit of research. pr92807 has indeed been backported to the
gcc-10 branch and is included in the gcc-10.3.0 release - it touches
gcc/config/i386/i386.c and adds a testcase. 

There is another fixup on top of that, which is the real fix the here reported
ICE:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=74dc179a6da33cd00f6d4a93fbb97dc84f610126
or r11-209-g74dc179a6da33cd00f6d4a93fbb97dc84f610126 , to which you pointed me
as the most likely fix. But that fixup (commited by Vladimir Makarov) doesn't
have any bug number in the description. I wrote him an email, maybe he will
comment here later.

Hint: its not an option to upgrade to gcc-11.2.0, since the cross compile
bootstrap is fundamentally broken by missing fenv header in the gcc-11 branch.
Mixing up host and target compiler versions is nothing to desire, its a place
where there will be dragons.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (10 preceding siblings ...)
  2021-10-20 15:29 ` herrtimson at yahoo dot de
@ 2021-10-21  7:25 ` marxin at gcc dot gnu.org
  2021-10-21 12:35 ` herrtimson at yahoo dot de
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-21  7:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
> Hint: its not an option to upgrade to gcc-11.2.0, since the cross compile
> bootstrap is fundamentally broken by missing fenv header in the gcc-11
> branch. Mixing up host and target compiler versions is nothing to desire,
> its a place where there will be dragons.

Oh, is it something we can help with? Is it a problem of the compiler?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (11 preceding siblings ...)
  2021-10-21  7:25 ` marxin at gcc dot gnu.org
@ 2021-10-21 12:35 ` herrtimson at yahoo dot de
  2021-10-21 17:47 ` vmakarov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-21 12:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

tt_1 <herrtimson at yahoo dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #11 from tt_1 <herrtimson at yahoo dot de> ---
(In reply to Martin Liška from comment #10)
> > Hint: its not an option to upgrade to gcc-11.2.0, since the cross compile
> > bootstrap is fundamentally broken by missing fenv header in the gcc-11
> > branch. Mixing up host and target compiler versions is nothing to desire,
> > its a place where there will be dragons.
> 
> Oh, is it something we can help with? Is it a problem of the compiler?

the fenv bug is not new and was reported via #100017, there is already a
discussion with two possible solutions. The title is a bit misleading, I hit it
when I bootstrap a rootfs with all libs and headers for the armv7 target. 

it seems that the fix for my gcc-10 bug was a stray commit without any bug
report, so I don't know who and where to ask for a proper backport. Gentoo's
gcc maintainer trofi (Sergey Trofimov) has resigned, to my great misfortune, so
I'm kind of lost with the process. Can we at least reopen? The bug is def not
fixed in the gcc-10 branch.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (12 preceding siblings ...)
  2021-10-21 12:35 ` herrtimson at yahoo dot de
@ 2021-10-21 17:47 ` vmakarov at gcc dot gnu.org
  2021-10-26 19:17 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2021-10-21 17:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #12 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
The patch just hid the bug.  I believe the bug is still present on the trunk
too.

The insn in question is

(insn 26 64 109 3 (parallel [
            (set (reg:SI 134 [ _12 ])
                (plus:SI (mult:SI (reg:SI 117 [ _8 ])
                        (reg:SI 128))
                    (reg:SI 138)))
            (set (reg:SI 135 [ _12+4 ])
                (plus:SI (truncate:SI (lshiftrt:DI (plus:DI (mult:DI
(zero_extend:DI (reg:SI 117 [ _8 ]))
                                    (zero_extend:DI (reg:SI 128)))
                                (zero_extend:DI (reg:SI 138)))
                            (const_int 32 [0x20])))
                    (reg:SI 138)))
        ]) "a.cpp":15:32 70 {umlal}
     (expr_list:REG_DEAD (reg:SI 138)
        (expr_list:REG_DEAD (reg:SI 128)
            (nil))))

And its definition is 

(define_insn "<US>mlal"
  [(set (match_operand:SI 0 "s_register_operand" "=r,&r")
        (plus:SI
         (mult:SI
          (match_operand:SI 4 "s_register_operand" "%r,r")
          (match_operand:SI 5 "s_register_operand" "r,r"))
         (match_operand:SI 1 "s_register_operand" "0,0")))
   (set (match_operand:SI 2 "s_register_operand" "=r,&r")
        (plus:SI
         (truncate:SI
          (lshiftrt:DI
           (plus:DI
            (mult:DI (SE:DI (match_dup 4)) (SE:DI (match_dup 5)))
            (zero_extend:DI (match_dup 1)))
           (const_int 32)))
         (match_operand:SI 3 "s_register_operand" "2,2")))]
  "TARGET_32BIT"
  "<US>mlal%?\\t%0, %2, %4, %5"
  [(set_attr "type" "umlal")
   (set_attr "predicable" "yes")
   (set_attr "arch" "v6,nov6")]

After couple of LRA constraints and assignment sub-passes, the two output
operands get the same hard reg.  And this results in cse abort in post-reload
pass.

The issue is that reload pseudos for pseudos 134 and 135 get the same value as
they both are matched with different occurrences of pseudo 138 in the insn.

The bug is in a very sensitive LRA code area and fixing it will take some time.
 But I hope I'll have a fix at the end of next week.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (13 preceding siblings ...)
  2021-10-21 17:47 ` vmakarov at gcc dot gnu.org
@ 2021-10-26 19:17 ` cvs-commit at gcc dot gnu.org
  2021-10-30 10:32 ` [Bug rtl-optimization/102842] [10/11/12 " herrtimson at yahoo dot de
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-26 19:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:

https://gcc.gnu.org/g:8c59f4118357789cfa8df2cf0d3ecb61be7e9041

commit r12-4721-g8c59f4118357789cfa8df2cf0d3ecb61be7e9041
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Tue Oct 26 14:03:42 2021 -0400

    [PR102842] Consider all outputs in generation of matching reloads

    Without considering all output insn operands (not only processed
    before), in rare cases LRA can use the same hard register for
    different outputs of the insn on different assignment subpasses.  The
    patch fixes the problem.

    gcc/ChangeLog:

            PR rtl-optimization/102842
            * lra-constraints.c (match_reload): Ignore out in checking values
            of outs.
            (curr_insn_transform): Collect outputs before doing reloads of
operands.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/102842
            * g++.target/arm/pr102842.C: New test.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10/11/12 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (14 preceding siblings ...)
  2021-10-26 19:17 ` cvs-commit at gcc dot gnu.org
@ 2021-10-30 10:32 ` herrtimson at yahoo dot de
  2021-11-03 17:47 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: herrtimson at yahoo dot de @ 2021-10-30 10:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

tt_1 <herrtimson at yahoo dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10 Regression] ICE in      |[10/11/12 Regression] ICE
                   |cselib_record_set at -O2 or |in cselib_record_set at -O2
                   |greater                     |or greater
             Status|CLOSED                      |REOPENED
         Resolution|FIXED                       |---

--- Comment #14 from tt_1 <herrtimson at yahoo dot de> ---
reopened, there is a new fix for this in trunk.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10/11/12 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (15 preceding siblings ...)
  2021-10-30 10:32 ` [Bug rtl-optimization/102842] [10/11/12 " herrtimson at yahoo dot de
@ 2021-11-03 17:47 ` cvs-commit at gcc dot gnu.org
  2021-11-03 17:48 ` cvs-commit at gcc dot gnu.org
  2021-11-05 13:51 ` rguenth at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-03 17:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Vladimir Makarov
<vmakarov@gcc.gnu.org>:

https://gcc.gnu.org/g:41bea618a77dca8c1c13a3d7b883976a25d83373

commit r11-9202-g41bea618a77dca8c1c13a3d7b883976a25d83373
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Tue Oct 26 14:03:42 2021 -0400

    [PR102842] Consider all outputs in generation of matching reloads

    Without considering all output insn operands (not only processed
    before), in rare cases LRA can use the same hard register for
    different outputs of the insn on different assignment subpasses.  The
    patch fixes the problem.

    gcc/ChangeLog:

            PR rtl-optimization/102842
            * lra-constraints.c (match_reload): Ignore out in checking values
            of outs.
            (curr_insn_transform): Collect outputs before doing reloads of
operands.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/102842
            * g++.target/arm/pr102842.C: New test.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10/11/12 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (16 preceding siblings ...)
  2021-11-03 17:47 ` cvs-commit at gcc dot gnu.org
@ 2021-11-03 17:48 ` cvs-commit at gcc dot gnu.org
  2021-11-05 13:51 ` rguenth at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-03 17:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Vladimir Makarov
<vmakarov@gcc.gnu.org>:

https://gcc.gnu.org/g:b7faffdb05aea6448b62b5d3b13009fc68dd103b

commit r10-10251-gb7faffdb05aea6448b62b5d3b13009fc68dd103b
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Tue Oct 26 14:03:42 2021 -0400

    [PR102842] Consider all outputs in generation of matching reloads

    Without considering all output insn operands (not only processed
    before), in rare cases LRA can use the same hard register for
    different outputs of the insn on different assignment subpasses.  The
    patch fixes the problem.

    gcc/ChangeLog:

            PR rtl-optimization/102842
            * lra-constraints.c (match_reload): Ignore out in checking values
            of outs.
            (curr_insn_transform): Collect outputs before doing reloads of
operands.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/102842
            * g++.target/arm/pr102842.C: New test.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug rtl-optimization/102842] [10/11/12 Regression] ICE in cselib_record_set at -O2 or greater
  2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
                   ` (17 preceding siblings ...)
  2021-11-03 17:48 ` cvs-commit at gcc dot gnu.org
@ 2021-11-05 13:51 ` rguenth at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-05 13:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102842

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
And now fixed everywhere.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-11-05 13:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 14:43 [Bug other/102842] New: [10 Regression] ICE in cselib_record_set at 02 or greater herrtimson at yahoo dot de
2021-10-19 14:43 ` [Bug other/102842] " herrtimson at yahoo dot de
2021-10-19 14:50 ` marxin at gcc dot gnu.org
2021-10-19 14:55 ` herrtimson at yahoo dot de
2021-10-19 18:36 ` [Bug rtl-optimization/102842] " pinskia at gcc dot gnu.org
2021-10-19 18:43 ` [Bug rtl-optimization/102842] [10/11/12 " pinskia at gcc dot gnu.org
2021-10-20  8:28 ` [Bug rtl-optimization/102842] [10 Regression] ICE in cselib_record_set at -O2 " marxin at gcc dot gnu.org
2021-10-20 10:46 ` marxin at gcc dot gnu.org
2021-10-20 10:46 ` marxin at gcc dot gnu.org
2021-10-20 11:32 ` herrtimson at yahoo dot de
2021-10-20 12:19 ` marxin at gcc dot gnu.org
2021-10-20 15:29 ` herrtimson at yahoo dot de
2021-10-21  7:25 ` marxin at gcc dot gnu.org
2021-10-21 12:35 ` herrtimson at yahoo dot de
2021-10-21 17:47 ` vmakarov at gcc dot gnu.org
2021-10-26 19:17 ` cvs-commit at gcc dot gnu.org
2021-10-30 10:32 ` [Bug rtl-optimization/102842] [10/11/12 " herrtimson at yahoo dot de
2021-11-03 17:47 ` cvs-commit at gcc dot gnu.org
2021-11-03 17:48 ` cvs-commit at gcc dot gnu.org
2021-11-05 13:51 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).