public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/94292] New: [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce
@ 2020-03-23 19:02 zsojka at seznam dot cz
  2020-03-24  7:06 ` [Bug rtl-optimization/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2020-03-23 19:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94292
           Summary: [10 Regression] ICE: SIGSEGV in
                    forward_propagate_and_simplify (fwprop.c:1417) with -O
                    -g -fno-tree-dce
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: armv7a-hardfloat-linux-gnueabi

Created attachment 48101
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48101&action=edit
reduced testcase

Compiler output:
$ armv7a-hardfloat-linux-gnueabi-gcc -O -g -fno-tree-dce testcase.c -wrapper
valgrind,-q
==29911== Invalid read of size 2
==29911==    at 0x19BF0D3: forward_propagate_and_simplify (fwprop.c:1417)
==29911==    by 0x19BF0D3: forward_propagate_into(df_ref_d*, bool)
(fwprop.c:1490)
==29911==    by 0x19BFDA9: fwprop(bool) (fwprop.c:1580)
==29911==    by 0xF44C0E: execute_one_pass(opt_pass*) (passes.c:2502)
==29911==    by 0xF453BF: execute_pass_list_1(opt_pass*) (passes.c:2590)
==29911==    by 0xF453D1: execute_pass_list_1(opt_pass*) (passes.c:2591)
==29911==    by 0xF453F8: execute_pass_list(function*, opt_pass*)
(passes.c:2601)
==29911==    by 0xBA8FDB: cgraph_node::expand() (cgraphunit.c:2300)
==29911==    by 0xBAA07F: expand_all_functions (cgraphunit.c:2471)
==29911==    by 0xBAA07F: symbol_table::compile() [clone .part.0]
(cgraphunit.c:2821)
==29911==    by 0xBAC7EC: compile (cgraphunit.c:2734)
==29911==    by 0xBAC7EC: symbol_table::finalize_compilation_unit()
(cgraphunit.c:3001)
==29911==    by 0x103F13A: compile_file() (toplev.c:483)
==29911==    by 0xA15047: do_compile (toplev.c:2273)
==29911==    by 0xA15047: toplev::main(int, char**) (toplev.c:2412)
==29911==    by 0xA178BE: main (main.c:39)
==29911==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29911== 
during RTL pass: fwprop1
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: Segmentation fault
    9 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

$ armv7a-hardfloat-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-armv7a-hardfloat/bin/armv7a-hardfloat-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r10-7327-20200323085706-g2fa4b1ffd6e-checking-yes-rtl-df-extra-pr94286-armv7a-hardfloat/bin/../libexec/gcc/armv7a-hardfloat-linux-gnueabi/10.0.1/lto-wrapper
Target: armv7a-hardfloat-linux-gnueabi
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-float=hard --with-fpu=vfpv4
--with-arch=armv7-a --with-sysroot=/usr/armv7a-hardfloat-linux-gnueabi
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=armv7a-hardfloat-linux-gnueabi
--with-ld=/usr/bin/armv7a-hardfloat-linux-gnueabi-ld
--with-as=/usr/bin/armv7a-hardfloat-linux-gnueabi-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r10-7327-20200323085706-g2fa4b1ffd6e-checking-yes-rtl-df-extra-pr94286-armv7a-hardfloat
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200323 (experimental) (GCC)

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

* [Bug rtl-optimization/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a
  2020-03-23 19:02 [Bug rtl-optimization/94292] New: [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce zsojka at seznam dot cz
@ 2020-03-24  7:06 ` marxin at gcc dot gnu.org
  2020-03-24 12:17 ` [Bug target/94292] " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-24  7:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-03-24
     Ever confirmed|0                           |1
            Summary|[10 Regression] ICE:        |[10 Regression] ICE:
                   |SIGSEGV in                  |SIGSEGV in
                   |forward_propagate_and_simpl |forward_propagate_and_simpl
                   |ify (fwprop.c:1417) with -O |ify (fwprop.c:1417) with -O
                   |-g -fno-tree-dce            |-g -fno-tree-dce since
                   |                            |r10-3985-g8b8ab8f473b42933b
                   |                            |9c1e292c4b1ab02adf1863a
   Target Milestone|---                         |10.0
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rearnsha at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a.

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

* [Bug target/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a
  2020-03-23 19:02 [Bug rtl-optimization/94292] New: [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce zsojka at seznam dot cz
  2020-03-24  7:06 ` [Bug rtl-optimization/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a marxin at gcc dot gnu.org
@ 2020-03-24 12:17 ` jakub at gcc dot gnu.org
  2020-03-25 18:07 ` cvs-commit at gcc dot gnu.org
  2020-03-25 18:09 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-24 12:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48104
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48104&action=edit
gcc10-pr94292.patch

Untested fix.

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

* [Bug target/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a
  2020-03-23 19:02 [Bug rtl-optimization/94292] New: [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce zsojka at seznam dot cz
  2020-03-24  7:06 ` [Bug rtl-optimization/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a marxin at gcc dot gnu.org
  2020-03-24 12:17 ` [Bug target/94292] " jakub at gcc dot gnu.org
@ 2020-03-25 18:07 ` cvs-commit at gcc dot gnu.org
  2020-03-25 18:09 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-25 18:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:6e4cd3cd259af2b5e04986a3f2222528a4f9f762

commit r10-7382-g6e4cd3cd259af2b5e04986a3f2222528a4f9f762
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Mar 25 19:06:45 2020 +0100

    arm: Fix ICE caused by arm_gen_dicompare_reg [PR94292]

    The following testcase ICEs, because arm_gen_dicompare_reg creates invalid
    RTL which then propagates into DEBUG_INSNs and ICEs while handling them.
    The problem is that this function emits
    (insn 18 17 19 2 (set (reg:CC_DNE 100 cc)
            (compare (ior:SI (ne:SI (subreg:SI (reg:DI 129) 0)
                        (subreg:SI (reg:DI 114 [ _2 ]) 0))
                    (ne:SI (subreg:SI (reg:DI 129) 4)
                        (subreg:SI (reg:DI 114 [ _2 ]) 4)))
                (const_int 0 [0]))) "pr94292.c":7:11 325 {*cmp_ior}
         (nil))
    and the invalid thing is that the COMPARE has VOIDmode.  Setting a
    non-VOIDmode SET_DEST to VOIDmode SET_SRC is only valid if the SET_SRC is
    CONST_INT/CONST_DOUBLE.
    The following patch fixes it by giving the COMPARE the same mode as it
gives
    to the SET_DEST cc register.

    2020-03-25  Jakub Jelinek  <jakub@redhat.com>

            PR target/94292
            * config/arm/arm.c (arm_gen_dicompare_reg): Set mode of COMPARE to
            mode rather than VOIDmode.

            * gcc.dg/pr94292.c: New test.

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

* [Bug target/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a
  2020-03-23 19:02 [Bug rtl-optimization/94292] New: [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2020-03-25 18:07 ` cvs-commit at gcc dot gnu.org
@ 2020-03-25 18:09 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-25 18:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-03-25 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 19:02 [Bug rtl-optimization/94292] New: [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce zsojka at seznam dot cz
2020-03-24  7:06 ` [Bug rtl-optimization/94292] [10 Regression] ICE: SIGSEGV in forward_propagate_and_simplify (fwprop.c:1417) with -O -g -fno-tree-dce since r10-3985-g8b8ab8f473b42933b9c1e292c4b1ab02adf1863a marxin at gcc dot gnu.org
2020-03-24 12:17 ` [Bug target/94292] " jakub at gcc dot gnu.org
2020-03-25 18:07 ` cvs-commit at gcc dot gnu.org
2020-03-25 18:09 ` 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).