public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324
@ 2022-03-04  8:03 asolokha at gmx dot com
  2022-03-07  8:21 ` [Bug debug/104778] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2022-03-04  8:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104778
           Summary: [12 Regression] ICE in simplify_subreg, at
                    simplify-rtx.cc:7324
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

Created attachment 52560
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52560&action=edit
Testcase

gcc 12.0.1 20220227 snapshot (g:d1574a9b820f17adb9004255e2018967e9be063b) ICEs
when compiling the attached testcase w/ -mcpu=a2 -Og -g:

% powerpc-e300c3-linux-gnu-gcc-12.0.1 -mcpu=a2 -Og -g -c poy2oawm.c
during RTL pass: vartrack
poy2oawm.c: In function 'foo':
poy2oawm.c:47:1: internal compiler error: in simplify_subreg, at
simplify-rtx.cc:7324
   47 | }
      | ^
0x6ad8e4 simplify_context::simplify_subreg(machine_mode, rtx_def*,
machine_mode, poly_int<1u, unsigned long>)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/simplify-rtx.cc:7324
0xe76f89 simplify_context::simplify_gen_subreg(machine_mode, rtx_def*,
machine_mode, poly_int<1u, unsigned long>)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/simplify-rtx.cc:7602
0x11c9e59 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode,
poly_int<1u, unsigned long>)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/rtl.h:3534
0x11c9e59 vt_expand_loc_callback
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8524
0x9e432d cselib_expand_value_rtx_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1848
0x9e4269 cselib_expand_value_rtx_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1921
0x9e4269 cselib_expand_value_rtx_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1921
0x9e4269 cselib_expand_value_rtx_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1921
0x9e5b7e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1731
0x11c9a23 vt_expand_var_loc_chain
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8420
0x11ca01d vt_expand_loc_callback
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8583
0x9e4516 cselib_expand_value_rtx_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1883
0x9e5b7e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1731
0x11c9a23 vt_expand_var_loc_chain
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8420
0x11ca01d vt_expand_loc_callback
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8583
0x9e5b7e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1731
0x11c9e22 vt_expand_loc_callback
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8517
0x9e432d cselib_expand_value_rtx_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1848
0x9e5b7e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/cselib.cc:1731
0x11c9a23 vt_expand_var_loc_chain
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220227/work/gcc-12-20220227/gcc/var-tracking.cc:8420

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
@ 2022-03-07  8:21 ` rguenth at gcc dot gnu.org
  2022-03-07 15:21 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-07  8:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
  2022-03-07  8:21 ` [Bug debug/104778] " rguenth at gcc dot gnu.org
@ 2022-03-07 15:21 ` jakub at gcc dot gnu.org
  2022-03-09  6:21 ` asolokha at gmx dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-07 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can't reproduce at least with current trunk, both with gcc configured for
powerpc64-linux-gnu and additional -m32, or in a cross to
powerpc-e300c3-linux-gnu with the given options.

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
  2022-03-07  8:21 ` [Bug debug/104778] " rguenth at gcc dot gnu.org
  2022-03-07 15:21 ` jakub at gcc dot gnu.org
@ 2022-03-09  6:21 ` asolokha at gmx dot com
  2022-03-11 14:37 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2022-03-09  6:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Arseny Solokha <asolokha at gmx dot com> ---
Created attachment 52586
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52586&action=edit
powerpc-e300c3-linux-gnu-gcc-12.0.1 -mcmpb -Og -g -c k1n69laf.c -Q
--help=target

It still ICEs for we w/ 20220306 snapshot.

  1. It does not ICE w/ -m64.

  2. It does not ICE when I add either -fPIC or -fno-PIC, likewise for -fpic
and -fno-pic.

  3. It ICEs if I replace -mcpu=a2 w/ -mcmpb (i.e.
powerpc-e300c3-linux-gnu-gcc-12.0.1 -mcmpb -Og -g -c poy2oawm.c).

% powerpc-e300c3-linux-gnu-gcc-12.0.1 -v
Using built-in specs.
COLLECT_GCC=powerpc-e300c3-linux-gnu-gcc-12.0.1
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-e300c3-linux-gnu/12.0.1/lto-wrapper
Target: powerpc-e300c3-linux-gnu
Configured with:
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220306/work/gcc-12-20220306/configure
--host=x86_64-pc-linux-gnu --target=powerpc-e300c3-linux-gnu
--build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/powerpc-e300c3-linux-gnu/gcc-bin/12.0.1
--includedir=/usr/lib/gcc/powerpc-e300c3-linux-gnu/12.0.1/include
--datadir=/usr/share/gcc-data/powerpc-e300c3-linux-gnu/12.0.1
--mandir=/usr/share/gcc-data/powerpc-e300c3-linux-gnu/12.0.1/man
--infodir=/usr/share/gcc-data/powerpc-e300c3-linux-gnu/12.0.1/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-e300c3-linux-gnu/12.0.1/include/g++-v12
--with-python-dir=/share/gcc-data/powerpc-e300c3-linux-gnu/12.0.1/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --disable-nls
--disable-libunwind-exceptions --enable-checking=yes --disable-esp
--enable-libstdcxx-time --disable-libstdcxx-pch
--enable-poison-system-directories --with-sysroot=/usr/powerpc-e300c3-linux-gnu
--disable-bootstrap --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libssp --disable-libada --disable-cet --disable-systemtap
--enable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --enable-lto --with-isl --disable-isl-version-check
--disable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220306 (experimental) (GCC)

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-03-09  6:21 ` asolokha at gmx dot com
@ 2022-03-11 14:37 ` jakub at gcc dot gnu.org
  2022-03-11 15:09 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-11 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Sorry, still can't reproduce that.
The --help=target output is very similar to yours, just (your -> mine):
-  -mcmodel=                            small
-  -mprioritize-restricted-insns=       1
+  -mprioritize-restricted-insns=       0
-  -mprofile-kernel                     [disabled]
-  -mstack-protector-guard=             tls
+  -mstack-protector-guard=             global

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-03-11 14:37 ` jakub at gcc dot gnu.org
@ 2022-03-11 15:09 ` jakub at gcc dot gnu.org
  2022-03-11 15:39 ` [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978 marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-11 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, I can reproduce with additional -fpie.
We should have never accepted the --enable-default-pie mess, that is a
maintainance nightmare.

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-03-11 15:09 ` jakub at gcc dot gnu.org
@ 2022-03-11 15:39 ` marxin at gcc dot gnu.org
  2022-03-11 17:23 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-11 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12 Regression] ICE in      |[12 Regression] ICE in
                   |simplify_subreg, at         |simplify_subreg, at
                   |simplify-rtx.cc:7324        |simplify-rtx.cc:7324 since
                   |                            |r12-1202-g9080a3bf232978
                 CC|                            |guihaoc at gcc dot gnu.org

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-1202-g9080a3bf232978.

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-03-11 15:39 ` [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978 marxin at gcc dot gnu.org
@ 2022-03-11 17:23 ` jakub at gcc dot gnu.org
  2022-03-11 17:59 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-11 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
                 CC|                            |vmakarov at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This seems to go wrong during LRA.
In *.ira we have just:
(debug_insn 352 199 201 19 (var_location:SI D#2 (reg:SI 227)) -1
     (nil))
but then LRA turns that into:
(debug_insn 352 199 201 19 (var_location:SI D#2 (plus:SI (plus:SI (minus:SI
(subreg:SI (reg:HI 130 [ _15 ]) 0)
                (subreg:SI (reg:DI 325 [orig:131 _16 ] [131]) 4))
            (subreg:SI (reg:HI 130 [ _15 ]) 0))
        (zero_extend:SI (subreg:QI (mem/c:SI (reg:SI 304) [0  S4 A32]) 3)))) -1
     (nil))
and later lra_substitute_pseudo turns that into:
(debug_insn 352 199 201 19 (var_location:SI D#2 (plus:SI (plus:SI (minus:SI
(subreg:SI (subreg:HI (reg:SI 270 [ a+4 ]) 2) 0)
                (subreg:SI (reg:DI 325 [orig:131 _16 ] [131]) 4))
            (subreg:SI (subreg:HI (reg:SI 270 [ a+4 ]) 2) 0))
        (zero_extend:SI (subreg:QI (mem/c:SI (reg:SI 304) [0  S4 A32]) 3)))) -1
     (nil))
and later another lra_substitute_pseudo turns that into:
(debug_insn 352 199 201 19 (var_location:SI D#2 (plus:SI (plus:SI (minus:SI
(subreg:SI (const_int 1 [0x1]) 0)
                (subreg:SI (reg:DI 325 [orig:131 _16 ] [131]) 4))
            (subreg:SI (const_int 1 [0x1]) 0))
        (zero_extend:SI (subreg:QI (mem/c:SI (reg:SI 304) [0  S4 A32]) 3)))) -1
     (nil))
I think we can deal in debug_insns with subreg inside of subreg, but we
certainly can't deal with a subreg with VOIDmode operand (ditto for
ZERO_EXTEND/SIGN_EXTEND etc.).

E.g. combine.cc (subst) has:
              if (GET_CODE (x) == SUBREG && CONST_SCALAR_INT_P (new_rtx))
                {
                  machine_mode mode = GET_MODE (x);

                  x = simplify_subreg (GET_MODE (x), new_rtx,
                                       GET_MODE (SUBREG_REG (x)),
                                       SUBREG_BYTE (x));
                  if (! x)
                    x = gen_rtx_CLOBBER (mode, const0_rtx);
                }
              else if (CONST_SCALAR_INT_P (new_rtx)
                       && (GET_CODE (x) == ZERO_EXTEND
                           || GET_CODE (x) == SIGN_EXTEND
                           || GET_CODE (x) == FLOAT
                           || GET_CODE (x) == UNSIGNED_FLOAT))
                {
                  x = simplify_unary_operation (GET_CODE (x), GET_MODE (x),
                                                new_rtx,
                                                GET_MODE (XEXP (x, 0)));
                  if (!x)
                    return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
                }
              /* CONST_INTs shouldn't be substituted into PRE_DEC, PRE_MODIFY
                 etc. arguments, otherwise we can ICE before trying to recog
                 it.  See PR104446.  */
              else if (CONST_SCALAR_INT_P (new_rtx)
                       && GET_RTX_CLASS (GET_CODE (x)) == RTX_AUTOINC)
                return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
              else
                SUBST (XEXP (x, i), new_rtx);
for this (note, RTX_AUTOINC shouldn't appear in debug insns, but the rest can).

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2022-03-11 17:23 ` jakub at gcc dot gnu.org
@ 2022-03-11 17:59 ` jakub at gcc dot gnu.org
  2022-03-11 21:25 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-11 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52614
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52614&action=edit
gcc12-pr104778.patch

Untested fix.

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2022-03-11 17:59 ` jakub at gcc dot gnu.org
@ 2022-03-11 21:25 ` pinskia at gcc dot gnu.org
  2022-03-14 13:50 ` cvs-commit at gcc dot gnu.org
  2022-03-14 13:52 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-11 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Ah, I can reproduce with additional -fpie.
> We should have never accepted the --enable-default-pie mess, that is a
> maintainance nightmare.

Well if they had used -freport-bug and attached that preprocessed source,
figuring out the exact options would not have been an issue.

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2022-03-11 21:25 ` pinskia at gcc dot gnu.org
@ 2022-03-14 13:50 ` cvs-commit at gcc dot gnu.org
  2022-03-14 13:52 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-14 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:77eb0461abe61a85f69270048ad81b25b1cc95d6

commit r12-7644-g77eb0461abe61a85f69270048ad81b25b1cc95d6
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Mar 14 14:49:09 2022 +0100

    lra: Fix up debug_p handling in lra_substitute_pseudo [PR104778]

    The following testcase ICEs on powerpc-linux, because lra_substitute_pseudo
    substitutes (const_int 1) into a subreg operand.  First a subreg of subreg
    of a reg appears in a debug insn (which surely is invalid outside of
    debug insns, but in debug insns we allow even what is normally invalid in
    RTL like subregs which the target doesn't like, because either dwarf2out
    is able to handle it, or we just throw away the location expression,
    making some var <optimized out>.

    lra_substitute_pseudo already has some code to deal with specifically
    SUBREG of REG with the REG being substituted for VOIDmode constant,
    but that doesn't cover this case, so the following patch extends
    lra_substitute_pseudo for debug_p mode to treat stuff like e.g.
    combiner's subst function to ensure we don't lose mode which is essential
    for the IL.

    2022-03-14  Jakub Jelinek  <jakub@redhat.com>

            PR debug/104778
            * lra.cc (lra_substitute_pseudo): For debug_p mode, simplify
            SUBREG, ZERO_EXTEND, SIGN_EXTEND, FLOAT or UNSIGNED_FLOAT if
recursive
            call simplified the first operand into VOIDmode constant.

            * gcc.target/powerpc/pr104778.c: New test.

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

* [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978
  2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2022-03-14 13:50 ` cvs-commit at gcc dot gnu.org
@ 2022-03-14 13:52 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-14 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-03-14 13:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04  8:03 [Bug rtl-optimization/104778] New: [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 asolokha at gmx dot com
2022-03-07  8:21 ` [Bug debug/104778] " rguenth at gcc dot gnu.org
2022-03-07 15:21 ` jakub at gcc dot gnu.org
2022-03-09  6:21 ` asolokha at gmx dot com
2022-03-11 14:37 ` jakub at gcc dot gnu.org
2022-03-11 15:09 ` jakub at gcc dot gnu.org
2022-03-11 15:39 ` [Bug debug/104778] [12 Regression] ICE in simplify_subreg, at simplify-rtx.cc:7324 since r12-1202-g9080a3bf232978 marxin at gcc dot gnu.org
2022-03-11 17:23 ` jakub at gcc dot gnu.org
2022-03-11 17:59 ` jakub at gcc dot gnu.org
2022-03-11 21:25 ` pinskia at gcc dot gnu.org
2022-03-14 13:50 ` cvs-commit at gcc dot gnu.org
2022-03-14 13:52 ` jakub 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).