public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
@ 2024-01-29 16:59 mjires at suse dot cz
  2024-01-30  7:46 ` [Bug tree-optimization/113659] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mjires at suse dot cz @ 2024-01-29 16:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113659
           Summary: [14 Regression] ICE Segmentation fault since
                    r14-8355-g02e683894942da
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mjires at suse dot cz
                CC: rguenther at suse dot de
  Target Milestone: ---

Compiling reduced testcase g++.dg/torture/predcom-1.C results in ICE since
r14-8355-g02e683894942da. Reintroduced PR113442.

$ cat predcom-1.C
struct Foo {
  int *ptr;
};
bool Baz(Foo first) {
  while (first.ptr)
    if (*first.ptr++)
      return false;
}


$ g++ predcom-1.C -O3 -fno-tree-sra -mavx512bf16
predcom-1.C: In function ‘bool Baz(Foo)’:
predcom-1.C:8:1: warning: control reaches end of non-void function
[-Wreturn-type]
    8 | }
      | ^
during GIMPLE pass: vect
predcom-1.C:4:6: internal compiler error: Segmentation fault
    4 | bool Baz(Foo first) {
      |      ^~~
0x1b06530 crash_signal
        /home/mjires/git/GCC/master/gcc/toplev.cc:317
0x13c5e6a gimple_phi_result(gphi const*)
        /home/mjires/git/GCC/master/gcc/gimple.h:4608
0x1e6a0a4 slpeel_tree_duplicate_loop_to_edge_cfg(loop*, edge_def*, loop*,
edge_def*, edge_def*, edge_def**, bool, vec<basic_block_def*, va_heap,
vl_ptr>*)
        /home/mjires/git/GCC/master/gcc/tree-vect-loop-manip.cc:1713
0x1e6f49e vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**,
tree_node**, tree_node**, int, bool, bool, tree_node**)
        /home/mjires/git/GCC/master/gcc/tree-vect-loop-manip.cc:3395
0x1e597a8 vect_transform_loop(_loop_vec_info*, gimple*)
        /home/mjires/git/GCC/master/gcc/tree-vect-loop.cc:11914
0x1eb23de vect_transform_loops
        /home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1006
0x1eb2b3e try_vectorize_loop_1
        /home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1152
0x1eb2c77 try_vectorize_loop
        /home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1182
0x1eb2f3e execute
        /home/mjires/git/GCC/master/gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240129 (experimental) (GCC)

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
@ 2024-01-30  7:46 ` pinskia at gcc dot gnu.org
  2024-01-30  7:47 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-30  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tnfchris at gcc dot gnu.org
   Target Milestone|---                         |14.0

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
  2024-01-30  7:46 ` [Bug tree-optimization/113659] " pinskia at gcc dot gnu.org
@ 2024-01-30  7:47 ` rguenth at gcc dot gnu.org
  2024-01-30  7:47 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-30  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
  2024-01-30  7:46 ` [Bug tree-optimization/113659] " pinskia at gcc dot gnu.org
  2024-01-30  7:47 ` rguenth at gcc dot gnu.org
@ 2024-01-30  7:47 ` rguenth at gcc dot gnu.org
  2024-01-30  7:56 ` tnfchris at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-30  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-01-30
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
                   ` (2 preceding siblings ...)
  2024-01-30  7:47 ` rguenth at gcc dot gnu.org
@ 2024-01-30  7:56 ` tnfchris at gcc dot gnu.org
  2024-01-30  8:42 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-01-30  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
looks like get_virtual_phi returned NULL.  but this loop shouldn't have
vectorized.  The submitted fix for PR113588 "fixes" it too by not allowing it
to be vectorized.

Such loops need to be handled differently in GCC 15 as we discussed before.

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
                   ` (3 preceding siblings ...)
  2024-01-30  7:56 ` tnfchris at gcc dot gnu.org
@ 2024-01-30  8:42 ` rguenth at gcc dot gnu.org
  2024-01-30 10:59 ` cvs-commit at gcc dot gnu.org
  2024-01-30 11:00 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-30  8:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is similar to gcc.c-torture/execute/20150611-1.c, this time
the main exit ends in a path without a virtual use (__builtin_unreachable ()).
We can do the same as we do for the alternate exits here.

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
                   ` (4 preceding siblings ...)
  2024-01-30  8:42 ` rguenth at gcc dot gnu.org
@ 2024-01-30 10:59 ` cvs-commit at gcc dot gnu.org
  2024-01-30 11:00 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-30 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC 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:4c2169d2f4061e72e1e61e9a175d16f7ff50f5c0

commit r14-8524-g4c2169d2f4061e72e1e61e9a175d16f7ff50f5c0
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jan 30 09:42:08 2024 +0100

    tree-optimization/113659 - early exit vectorization and missing VUSE

    The following handles the case of the main exit going to a path without
    virtual use and handles it similar to the alternate exit handling.

            PR tree-optimization/113659
            * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
            Handle main exit without virtual use.

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

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

* [Bug tree-optimization/113659] [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da
  2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
                   ` (5 preceding siblings ...)
  2024-01-30 10:59 ` cvs-commit at gcc dot gnu.org
@ 2024-01-30 11:00 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-30 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

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] 8+ messages in thread

end of thread, other threads:[~2024-01-30 11:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 16:59 [Bug tree-optimization/113659] New: [14 Regression] ICE Segmentation fault since r14-8355-g02e683894942da mjires at suse dot cz
2024-01-30  7:46 ` [Bug tree-optimization/113659] " pinskia at gcc dot gnu.org
2024-01-30  7:47 ` rguenth at gcc dot gnu.org
2024-01-30  7:47 ` rguenth at gcc dot gnu.org
2024-01-30  7:56 ` tnfchris at gcc dot gnu.org
2024-01-30  8:42 ` rguenth at gcc dot gnu.org
2024-01-30 10:59 ` cvs-commit at gcc dot gnu.org
2024-01-30 11:00 ` 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).