public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note)
@ 2020-07-06  4:47 asolokha at gmx dot com
  2020-08-11  4:13 ` [Bug target/96072] " asolokha at gmx dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: asolokha at gmx dot com @ 2020-07-06  4:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96072
           Summary: ICE: Segmentation fault (in add_reg_note)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

gcc-11.0.0 snapshot (g:cc9a9229285a26ac12bc8de53237ce9c4d42f867) ICEs when
compiling gcc/testsuite/gcc.target/pru/clobber-sp.c w/ -O1:

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -O1 -w -c
gcc/testsuite/gcc.target/pru/clobber-sp.c
during RTL pass: pro_and_epilogue
gcc/testsuite/gcc.target/pru/clobber-sp.c: In function 'test1':
gcc/testsuite/gcc.target/pru/clobber-sp.c:24:1: internal compiler error:
Segmentation fault
   24 | }
      | ^
0xe74ba6 crash_signal
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/toplev.c:328
0xe09f99 add_reg_note(rtx_def*, reg_note, rtx_def*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/rtlanal.c:2404
0x1271d6a rs6000_emit_epilogue(epilogue_type)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/config/rs6000/rs6000-logue.c:4884
0x15803ce gen_epilogue()
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/config/rs6000/rs6000.md:13210
0x11f5bf8 target_gen_epilogue
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/config/rs6000/rs6000.md:10475
0xb2d46f make_epilogue_seq
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:5822
0xb2d55f thread_prologue_and_epilogue_insns()
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:5904
0xb2dc86 rest_of_handle_thread_prologue_and_epilogue
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:6394
0xb2dc86 execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:6470

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

* [Bug target/96072] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
@ 2020-08-11  4:13 ` asolokha at gmx dot com
  2020-08-19  7:30 ` asolokha at gmx dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: asolokha at gmx dot com @ 2020-08-11  4:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Arseny Solokha <asolokha at gmx dot com> ---
testsuite/gcc.target/s390/20041109-1.c is another similar case which clobbers
SP on PowerPC. Maybe it's time to turn

  warning: listing the stack pointer register 'sp' in a clobber list is
deprecated

into a hard error and be done with it?

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

* [Bug target/96072] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
  2020-08-11  4:13 ` [Bug target/96072] " asolokha at gmx dot com
@ 2020-08-19  7:30 ` asolokha at gmx dot com
  2022-09-13 22:25 ` segher at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: asolokha at gmx dot com @ 2020-08-19  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Arseny Solokha <asolokha at gmx dot com> ---
Finally, yet another testcase which also plays games w/ SP but, unlike the
previous two, does not involve its "manual" manipulation.

void
he (int jn)
{
  {
    int bh[jn];

    if (jn != 0)
      goto wa;
  }

 wa:
  ;
}

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

* [Bug target/96072] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
  2020-08-11  4:13 ` [Bug target/96072] " asolokha at gmx dot com
  2020-08-19  7:30 ` asolokha at gmx dot com
@ 2022-09-13 22:25 ` segher at gcc dot gnu.org
  2022-09-14  2:33 ` asolokha at gmx dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: segher at gcc dot gnu.org @ 2022-09-13 22:25 UTC (permalink / raw)
  To: gcc-bugs

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

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-09-13

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
None of these ICE, not at any optimisation level, for no Linux ABI.  Is this
fixed, are any special options needed?

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

* [Bug target/96072] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-09-13 22:25 ` segher at gcc dot gnu.org
@ 2022-09-14  2:33 ` asolokha at gmx dot com
  2022-09-14 12:20 ` linkw at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: asolokha at gmx dot com @ 2022-09-14  2:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
They still ICE for me.

% powerpc-e300c3-linux-gnu-gcc-13.0.0 -v
Using built-in specs.
COLLECT_GCC=powerpc-e300c3-linux-gnu-gcc-13.0.0
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-e300c3-linux-gnu/13.0.0/lto-wrapper
Target: powerpc-e300c3-linux-gnu
Configured with:
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-13.0.0_p20220911/work/gcc-13-20220911/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/13.0.0
--includedir=/usr/lib/gcc/powerpc-e300c3-linux-gnu/13.0.0/include
--datadir=/usr/share/gcc-data/powerpc-e300c3-linux-gnu/13.0.0
--mandir=/usr/share/gcc-data/powerpc-e300c3-linux-gnu/13.0.0/man
--infodir=/usr/share/gcc-data/powerpc-e300c3-linux-gnu/13.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-e300c3-linux-gnu/13.0.0/include/g++-v13
--with-python-dir=/share/gcc-data/powerpc-e300c3-linux-gnu/13.0.0/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-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20220911 (experimental) (GCC)

% powerpc-e300c3-linux-gnu-gcc-13.0.0 -Q --help=target
The following options are target specific:
  -G<number>                            8
  -m32                                  [enabled]
  -m64                                  [disabled]
  -mabi=altivec                         [disabled]
  -mabi=d32                             [enabled]
  -mabi=d64                             [disabled]
  -mabi=elfv1                           [disabled]
  -mabi=elfv2                           [disabled]
  -mabi=ibmlongdouble                   [enabled]
  -mabi=ieeelongdouble                  [disabled]
  -mabi=no-altivec                      [enabled]
  -mabi=vec-default                     [enabled]
  -mabi=vec-extabi                      [disabled]
  -mads                                 [disabled]
  -maix-struct-return                   [enabled]
  -malign-                              natural
  -malign-branch-targets                
  -mallow-movmisalign                   [disabled]
  -maltivec                             [disabled]
  -malways-hint                         
  -mavoid-indexed-addresses             [disabled]
  -mbig                                 [enabled]
  -mbig-endian                          [enabled]
  -mbionic                              [disabled]
  -mbit-align                           [disabled]
  -mbit-word                            [disabled]
  -mblock-compare-inline-limit=         63
  -mblock-compare-inline-loop-limit=    -1
  -mblock-move-inline-limit=            32
  -mblock-ops-unaligned-vsx             [disabled]
  -mblock-ops-vector-pair               [disabled]
  -mbss-plt                             [disabled]
  -mcall-ABI                            linux
  -mcmodel=                             small
  -mcmpb                                [disabled]
  -mcompat-align-parm                   [disabled]
  -mcpu=                                [default]
  -mcrypto                              [disabled]
  -mdebug=                              
  -mdirect-move                         [disabled]
  -mdlmzb                               [disabled]
  -meabi                                [disabled]
  -mefficient-unaligned-vsx             [disabled]
  -memb                                 [disabled]
  -mfloat128                            [disabled]
  -mfloat128-convert                    [disabled]
  -mfloat128-hardware                   [disabled]
  -mfp-in-toc                           [enabled]
  -mfprnd                               [disabled]
  -mfriz                                
  -mfull-toc                            [disabled]
  -mfused-madd                          -ffp-contract=fast
  -mgen-cell-microcode                  [ignored]
  -mglibc                               [enabled]
  -mgnu-attribute                       [enabled]
  -mhard-dfp                            [disabled]
  -mhard-float                          [enabled]
  -mhtm                                 [disabled]
  -mieee128-constant                    [enabled]
  -minsert-sched-nops=                  
  -misel                                [disabled]
  -mlittle                              [disabled]
  -mlittle-endian                       [disabled]
  -mlong-double-                        127
  -mlongcall                            [disabled]
  -mlra                                 [ignored]
  -mmfcrf                               [disabled]
  -mmfpgpr                              [disabled]
  -mminimal-toc                         [disabled]
  -mmma                                 [disabled]
  -mmodulo                              [disabled]
  -mmulhw                               [disabled]
  -mmultiple                            [disabled]
  -mmusl                                [disabled]
  -mmvme                                [disabled]
  -mnewlib                              [disabled]
  -mno-fp-in-toc                        [disabled]
  -mno-mfpgpr                           [ignored]
  -mno-string                           [ignored]
  -mno-sum-in-toc                       [disabled]
  -mno-toc                              [disabled]
  -mno-traceback                        [disabled]
  -mno-update                           [disabled]
  -moptimize-swaps                      [enabled]
  -mpcrel                               [disabled]
  -mpcrel-opt                           [disabled]
  -mpltseq                              [enabled]
  -mpointers-to-nested-functions        [enabled]
  -mpopcntb                             [disabled]
  -mpopcntd                             [disabled]
  -mpower10                             [disabled]
  -mpower10-fusion                      [disabled]
  -mpower8-fusion                       [disabled]
  -mpower8-fusion-sign                  [disabled]
  -mpower8-vector                       [disabled]
  -mpower9-minmax                       [disabled]
  -mpower9-misc                         [disabled]
  -mpower9-vector                       [disabled]
  -mpowerpc                             [ignored]
  -mpowerpc-gfxopt                      [disabled]
  -mpowerpc-gpopt                       [disabled]
  -mpowerpc64                           [disabled]
  -mprefixed                            [disabled]
  -mprioritize-restricted-insns=        1
  -mprivileged                          [disabled]
  -mprofile-kernel                      [disabled]
  -mprototype                           [disabled]
  -mquad-memory                         [disabled]
  -mquad-memory-atomic                  [disabled]
  -mreadonly-in-sdata                   [enabled]
  -mrecip                               [disabled]
  -mrecip-precision                     [disabled]
  -mrecip=                              
  -mregnames                            [disabled]
  -mrelative-jumptables                 [enabled]
  -mrelocatable                         [disabled]
  -mrelocatable-lib                     [disabled]
  -mrop-protect                         [disabled]
  -msave-toc-indirect                   [enabled]
  -msched-costly-dep=                   
  -msched-epilog                        [enabled]
  -msched-groups                        
  -msched-prolog                        [enabled]
  -msdata                               [disabled]
  -msdata=[none,data,sysv,eabi]         data
  -msecure-plt                          [enabled]
  -mshlib                               [disabled]
  -msim                                 [disabled]
  -msingle-pic-base                     [disabled]
  -msoft-float                          [disabled]
  -mspeculate-indirect-jumps            [enabled]
  -msplat-float-constant                [enabled]
  -msplat-word-constant                 [enabled]
  -mstack-protector-guard-offset=       
  -mstack-protector-guard-reg=          
  -mstack-protector-guard=              tls
  -mstrict-align                        [disabled]
  -mstring                              [disabled]
  -mstring-compare-inline-limit=        64
  -msum-in-toc                          [enabled]
  -msvr4-struct-return                  [disabled]
  -mtls-size=[16,32]                    32
  -mtoc                                 [disabled]
  -mtraceback=[full,part,no]            [default]
  -mtune=                               [default]
  -muclibc                              [disabled]
  -munroll-only-small-loops             [disabled]
  -mupdate                              [enabled]
  -mveclibabi=                          
  -mvrsave                              [disabled]
  -mvrsave=no                           -mvrsave
  -mvrsave=yes                          -mvrsave
  -mvsx                                 [disabled]
  -mvsx-align-128                       [disabled]
  -mvsx-timode                          [ignored]
  -mwarn-altivec-long                   [enabled]
  -mxl-compat                           [disabled]
  -myellowknife                         [disabled]

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

* [Bug target/96072] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-09-14  2:33 ` asolokha at gmx dot com
@ 2022-09-14 12:20 ` linkw at gcc dot gnu.org
  2022-09-14 12:23 ` linkw at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-09-14 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |linkw at gcc dot gnu.org
             Status|WAITING                     |NEW

--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed.

  if (DEFAULT_ABI == ABI_V4 || flag_shrink_wrap)
    {
      /* If the frame pointer was used then we can't delay emitting
         a REG_CFA_DEF_CFA note.  This must happen on the insn that
         restores the frame pointer, r31.  We may have already emitted
         a REG_CFA_DEF_CFA note, but that's OK;  A duplicate is
         discarded by dwarf2cfi.cc/dwarf2out.cc, and in any case would
         be harmless if emitted.  */
      if (frame_pointer_needed)
        {
          insn = get_last_insn ();
          add_reg_note (insn, REG_CFA_DEF_CFA,
                        plus_constant (Pmode, frame_reg_rtx, frame_off));
          RTX_FRAME_RELATED_P (insn) = 1;
        }

ICE since the insn here is (rtx) 0x0.

I think the code here has the assumption that the frame pointer restoring
happened ahead, it's:

  /* If we have a frame pointer, we can restore the old stack pointer
     from it.  */
  else if (frame_pointer_needed_indeed)
    {
      frame_reg_rtx = sp_reg_rtx;
      ....

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

* [Bug target/96072] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-09-14 12:20 ` linkw at gcc dot gnu.org
@ 2022-09-14 12:23 ` linkw at gcc dot gnu.org
  2022-09-15  5:44 ` [Bug target/96072] [10/11/12 Regression] " linkw at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-09-14 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

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

--- Comment #6 from Kewen Lin <linkw at gcc dot gnu.org> ---
diff --git a/gcc/config/rs6000/rs6000-logue.cc
b/gcc/config/rs6000/rs6000-logue.cc
index 59fe1c8cb8b..a868ede24fb 100644
--- a/gcc/config/rs6000/rs6000-logue.cc
+++ b/gcc/config/rs6000/rs6000-logue.cc
@@ -4924,7 +4924,7 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type)
         a REG_CFA_DEF_CFA note, but that's OK;  A duplicate is
         discarded by dwarf2cfi.cc/dwarf2out.cc, and in any case would
         be harmless if emitted.  */
-      if (frame_pointer_needed)
+      if (frame_pointer_needed_indeed)
        {
          insn = get_last_insn ();
          add_reg_note (insn, REG_CFA_DEF_CFA,

The above diff can fix the issue, I think it's related to commit r10-7981,
which introduced frame_pointer_needed_indeed but missed to update the condition
for adding reg note under new flag.

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

* [Bug target/96072] [10/11/12 Regression] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-09-14 12:23 ` linkw at gcc dot gnu.org
@ 2022-09-15  5:44 ` linkw at gcc dot gnu.org
  2022-09-26  5:34 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-09-15  5:44 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
            Summary|ICE: Segmentation fault (in |[10/11/12 Regression] ICE:
                   |add_reg_note)               |Segmentation fault (in
                   |                            |add_reg_note)

--- Comment #7 from Kewen Lin <linkw at gcc dot gnu.org> ---
I confirmed this is one regression, it passed with r10-7980 but started to fail
with r10-7981. And it's reproducible on ppc64 be machine with options "-m32
-O1".

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

* [Bug target/96072] [10/11/12 Regression] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2022-09-15  5:44 ` [Bug target/96072] [10/11/12 Regression] " linkw at gcc dot gnu.org
@ 2022-09-26  5:34 ` cvs-commit at gcc dot gnu.org
  2022-10-19  9:05 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-26  5:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:5be0950d22209f5ba69d244387228e12389a8470

commit r13-2846-g5be0950d22209f5ba69d244387228e12389a8470
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Sep 26 00:33:18 2022 -0500

    rs6000: Fix the condition with frame_pointer_needed_indeed [PR96072]

    As PR96072 shows, the code adding REG_CFA_DEF_CFA reg note
    makes one assumption that we have emitted one insn which
    restores the frame pointer previously.  That part of code
    was guarded with flag frame_pointer_needed before, it was
    consistent, but it was replaced with flag
    frame_pointer_needed_indeed since commit r10-7981.  It
    caused ICE due to unexpected NULL insn.

            PR target/96072

    gcc/ChangeLog:

            * config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): Update the
            condition for adding REG_CFA_DEF_CFA reg note with
            frame_pointer_needed_indeed.

    gcc/testsuite/ChangeLog:

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

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

* [Bug target/96072] [10/11/12 Regression] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2022-09-26  5:34 ` cvs-commit at gcc dot gnu.org
@ 2022-10-19  9:05 ` cvs-commit at gcc dot gnu.org
  2022-10-19 11:24 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-19  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

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

commit r12-8846-gc7f17493cc26a4395d549547075603a15f4c94a7
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Sep 26 00:33:18 2022 -0500

    rs6000: Fix the condition with frame_pointer_needed_indeed [PR96072]

    As PR96072 shows, the code adding REG_CFA_DEF_CFA reg note
    makes one assumption that we have emitted one insn which
    restores the frame pointer previously.  That part of code
    was guarded with flag frame_pointer_needed before, it was
    consistent, but it was replaced with flag
    frame_pointer_needed_indeed since commit r10-7981.  It
    caused ICE due to unexpected NULL insn.

            PR target/96072

    gcc/ChangeLog:

            * config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): Update the
            condition for adding REG_CFA_DEF_CFA reg note with
            frame_pointer_needed_indeed.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit 5be0950d22209f5ba69d244387228e12389a8470)

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

* [Bug target/96072] [10/11/12 Regression] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2022-10-19  9:05 ` cvs-commit at gcc dot gnu.org
@ 2022-10-19 11:24 ` cvs-commit at gcc dot gnu.org
  2022-10-20  2:16 ` cvs-commit at gcc dot gnu.org
  2022-10-20  2:28 ` linkw at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-19 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:25b6cbe8a9abd5ad9b05f23f00f9ae68aa105c99

commit r11-10322-g25b6cbe8a9abd5ad9b05f23f00f9ae68aa105c99
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Sep 26 00:33:18 2022 -0500

    rs6000: Fix the condition with frame_pointer_needed_indeed [PR96072]

    As PR96072 shows, the code adding REG_CFA_DEF_CFA reg note
    makes one assumption that we have emitted one insn which
    restores the frame pointer previously.  That part of code
    was guarded with flag frame_pointer_needed before, it was
    consistent, but it was replaced with flag
    frame_pointer_needed_indeed since commit r10-7981.  It
    caused ICE due to unexpected NULL insn.

            PR target/96072

    gcc/ChangeLog:

            * config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): Update the
            condition for adding REG_CFA_DEF_CFA reg note with
            frame_pointer_needed_indeed.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit 5be0950d22209f5ba69d244387228e12389a8470)

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

* [Bug target/96072] [10/11/12 Regression] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2022-10-19 11:24 ` cvs-commit at gcc dot gnu.org
@ 2022-10-20  2:16 ` cvs-commit at gcc dot gnu.org
  2022-10-20  2:28 ` linkw at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-20  2:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

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

commit r10-11047-gfa38c8b46eec550aee7e561c5b4b7c01a4ef42e3
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Mon Sep 26 00:33:18 2022 -0500

    rs6000: Fix the condition with frame_pointer_needed_indeed [PR96072]

    As PR96072 shows, the code adding REG_CFA_DEF_CFA reg note
    makes one assumption that we have emitted one insn which
    restores the frame pointer previously.  That part of code
    was guarded with flag frame_pointer_needed before, it was
    consistent, but it was replaced with flag
    frame_pointer_needed_indeed since commit r10-7981.  It
    caused ICE due to unexpected NULL insn.

            PR target/96072

    gcc/ChangeLog:

            * config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): Update the
            condition for adding REG_CFA_DEF_CFA reg note with
            frame_pointer_needed_indeed.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit 5be0950d22209f5ba69d244387228e12389a8470)

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

* [Bug target/96072] [10/11/12 Regression] ICE: Segmentation fault (in add_reg_note)
  2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
                   ` (10 preceding siblings ...)
  2022-10-20  2:16 ` cvs-commit at gcc dot gnu.org
@ 2022-10-20  2:28 ` linkw at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-10-20  2:28 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

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

--- Comment #12 from Kewen Lin <linkw at gcc dot gnu.org> ---
Should be fixed on trunk and gcc10/11/12 release branches.

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

end of thread, other threads:[~2022-10-20  2:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06  4:47 [Bug target/96072] New: ICE: Segmentation fault (in add_reg_note) asolokha at gmx dot com
2020-08-11  4:13 ` [Bug target/96072] " asolokha at gmx dot com
2020-08-19  7:30 ` asolokha at gmx dot com
2022-09-13 22:25 ` segher at gcc dot gnu.org
2022-09-14  2:33 ` asolokha at gmx dot com
2022-09-14 12:20 ` linkw at gcc dot gnu.org
2022-09-14 12:23 ` linkw at gcc dot gnu.org
2022-09-15  5:44 ` [Bug target/96072] [10/11/12 Regression] " linkw at gcc dot gnu.org
2022-09-26  5:34 ` cvs-commit at gcc dot gnu.org
2022-10-19  9:05 ` cvs-commit at gcc dot gnu.org
2022-10-19 11:24 ` cvs-commit at gcc dot gnu.org
2022-10-20  2:16 ` cvs-commit at gcc dot gnu.org
2022-10-20  2:28 ` linkw 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).