public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O
@ 2020-09-29 10:44 zsojka at seznam dot cz
  2020-09-29 11:34 ` [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577 jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2020-09-29 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97238
           Summary: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code
                    (gimple.h:2797) with -O
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c -wrapper valgrind,-q
==31466== Invalid read of size 2
==31466==    at 0x750E2C: gimple_assign_rhs_code (gimple.h:2797)
==31466==    by 0x750E2C: ovce_extract_ops(tree_node*, gassign**, bool*,
tree_node**, tree_node**, tree_node**, gassign**) [clone .part.0] [clone
.isra.0] [clone .cold] (tree-ssa-reassoc.c:3914)
==31466==    by 0x119A493: ovce_extract_ops (tree-ssa-reassoc.c:3893)
==31466==    by 0x119A493: optimize_vec_cond_expr (tree-ssa-reassoc.c:3970)
==31466==    by 0x119A493: reassociate_bb(basic_block_def*)
(tree-ssa-reassoc.c:6465)
==31466==    by 0x1199DE8: reassociate_bb(basic_block_def*)
(tree-ssa-reassoc.c:6606)
==31466==    by 0x119C25E: do_reassoc (tree-ssa-reassoc.c:6718)
==31466==    by 0x119C25E: execute_reassoc (tree-ssa-reassoc.c:6805)
==31466==    by 0x119C25E: (anonymous
namespace)::pass_reassoc::execute(function*) (tree-ssa-reassoc.c:6844)
==31466==    by 0xEFBDF7: execute_one_pass(opt_pass*) (passes.c:2509)
==31466==    by 0xEFC76F: execute_pass_list_1(opt_pass*) (passes.c:2597)
==31466==    by 0xEFC781: execute_pass_list_1(opt_pass*) (passes.c:2598)
==31466==    by 0xEFC7A8: execute_pass_list(function*, opt_pass*)
(passes.c:2608)
==31466==    by 0xB88B8B: cgraph_node::expand() (cgraphunit.c:2309)
==31466==    by 0xB8A0EF: expand_all_functions (cgraphunit.c:2480)
==31466==    by 0xB8A0EF: symbol_table::compile() [clone .part.0]
(cgraphunit.c:2843)
==31466==    by 0xB8C522: compile (cgraphunit.c:2756)
==31466==    by 0xB8C522: symbol_table::finalize_compilation_unit()
(cgraphunit.c:3021)
==31466==    by 0xFF2AC9: compile_file() (toplev.c:484)
==31466==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==31466== 
during GIMPLE pass: reassoc
testcase.c: In function 'foo':
testcase.c:6:1: internal compiler error: Segmentation fault
    6 | foo (void)
      | ^~~
0x4fd9cfa __libc_start_main
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r11-3519-20200929092607-ge46858e4eee-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
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 --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r11-3519-20200929092607-ge46858e4eee-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200929 (experimental) (GCC)

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

* [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577
  2020-09-29 10:44 [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O zsojka at seznam dot cz
@ 2020-09-29 11:34 ` jakub at gcc dot gnu.org
  2020-09-29 11:48 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-09-29 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
   Last reconfirmed|                            |2020-09-29
            Summary|[11 Regression] ICE:        |[11 Regression] ICE:
                   |SIGSEGV in                  |SIGSEGV in
                   |gimple_assign_rhs_code      |gimple_assign_rhs_code
                   |(gimple.h:2797) with -O     |(gimple.h:2797) with -O
                   |                            |since r11-2577
             Status|UNCONFIRMED                 |NEW
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-2577-g229752afe3156a3990dacaedb94c76846cebf132

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

* [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577
  2020-09-29 10:44 [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O zsojka at seznam dot cz
  2020-09-29 11:34 ` [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577 jakub at gcc dot gnu.org
@ 2020-09-29 11:48 ` rguenth at gcc dot gnu.org
  2020-09-29 11:50 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-29 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
3912      gassign *assign = dyn_cast<gassign *> (SSA_NAME_DEF_STMT (cond));
3913      if (stmt == NULL
3914          || TREE_CODE_CLASS (gimple_assign_rhs_code (assign)) !=
tcc_comparison)
3915        return ERROR_MARK;

typo, should be assign == NULL.

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

* [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577
  2020-09-29 10:44 [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O zsojka at seznam dot cz
  2020-09-29 11:34 ` [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577 jakub at gcc dot gnu.org
  2020-09-29 11:48 ` rguenth at gcc dot gnu.org
@ 2020-09-29 11:50 ` jakub at gcc dot gnu.org
  2020-09-29 12:40 ` cvs-commit at gcc dot gnu.org
  2020-09-29 12:40 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-09-29 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, just came to the same conclusion ;)

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

* [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577
  2020-09-29 10:44 [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2020-09-29 11:50 ` jakub at gcc dot gnu.org
@ 2020-09-29 12:40 ` cvs-commit at gcc dot gnu.org
  2020-09-29 12:40 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-29 12:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:29aef377d814bd342dd5a306f99e0d614623ce0e

commit r11-3524-g29aef377d814bd342dd5a306f99e0d614623ce0e
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Sep 29 14:38:06 2020 +0200

    tree-optimization/97238 - fix typo causing ICE

    This fixes a typo causing a NULL dereference.

    2020-09-29  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97238
            * tree-ssa-reassoc.c (ovce_extract_ops): Fix typo.

            * gcc.dg/pr97238.c: New testcase.

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

* [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577
  2020-09-29 10:44 [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2020-09-29 12:40 ` cvs-commit at gcc dot gnu.org
@ 2020-09-29 12:40 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-29 12:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-09-29 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 10:44 [Bug tree-optimization/97238] New: [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O zsojka at seznam dot cz
2020-09-29 11:34 ` [Bug tree-optimization/97238] [11 Regression] ICE: SIGSEGV in gimple_assign_rhs_code (gimple.h:2797) with -O since r11-2577 jakub at gcc dot gnu.org
2020-09-29 11:48 ` rguenth at gcc dot gnu.org
2020-09-29 11:50 ` jakub at gcc dot gnu.org
2020-09-29 12:40 ` cvs-commit at gcc dot gnu.org
2020-09-29 12:40 ` 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).