public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled
@ 2022-04-29 21:19 giuliano.belinassi at gmail dot com
  2022-05-02  6:47 ` [Bug tree-optimization/105437] [11/12/13 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: giuliano.belinassi at gmail dot com @ 2022-04-29 21:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105437
           Summary: ICE on GIMPLE pass slp when vectorizer is enabled
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: giuliano.belinassi at gmail dot com
  Target Milestone: ---

Given the following C++ input:
```
struct ControlClass
{
    virtual ~ControlClass();

    int Width;
    int Height;
    unsigned IsToRepaint : 1;
};

struct SelectClass : ControlClass
{
    SelectClass(void);
};

int Non_Folded_Value();

SelectClass::SelectClass(void)
{
    int factor = Non_Folded_Value();
    Width = 32 << factor;
    Height = 24 << factor;
}
```

saved as bug.cpp, and compiling with:

> g++-11 -O2 -ftree-vectorize -S bug.cpp

results in the following ICE:
```
during GIMPLE pass: ehcleanup
bug.cpp: In constructor ‘SelectClass::SelectClass()’:
bug.cpp:17:1: internal compiler error: in mark_reachable_handlers, at
tree->eh.c:4036
   17 | SelectClass::SelectClass(void)
      | ^~~~~~~~~~~
0x7f03bd2cd2bc __libc_start_main
        ???:0
```

This bug is still present on trunk. It happens even without -ftree-vectorize,
but the output is:
```
bug.cpp: In constructor ‘SelectClass::SelectClass()’:
bug.cpp:17:1: error: statement marked for throw in middle of block
   17 | SelectClass::SelectClass(void)
      | ^~~~~~~~~~~
# .MEM_8 = VDEF <.MEM_7>
_9 = Non_Folded_Value ();
during GIMPLE pass: slp
bug.cpp:17:1: internal compiler error: verify_gimple failed
0x112f364 verify_gimple_in_cfg(function*, bool)
        ../../gcc/gcc/tree-cfg.cc:5561
0xfd5eae execute_function_todo
        ../../gcc/gcc/passes.cc:2085
0xfd6932 execute_todo
        ../../gcc/gcc/passes.cc:2139

```

I tracked this issue back to commit 9e5508c2d006f2d4f8670e6c3fed770ac1c85e64:
"refactor SLP constant insertion and provde entry insert helper", but simple
`git revert` doesn't work as one of the files seems to have been deleted/moved.

GCC-10 and older are unaffected. (tested until gcc 7.5.0)

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

* [Bug tree-optimization/105437] [11/12/13 Regression] ICE on GIMPLE pass slp when vectorizer is enabled
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
@ 2022-05-02  6:47 ` rguenth at gcc dot gnu.org
  2022-05-02  8:43 ` [Bug tree-optimization/105437] [11/12/13 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4 cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-02  6:47 UTC (permalink / raw)
  To: gcc-bugs

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

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
           Keywords|                            |ice-on-valid-code
            Summary|ICE on GIMPLE pass slp when |[11/12/13 Regression] ICE
                   |vectorizer is enabled       |on GIMPLE pass slp when
                   |                            |vectorizer is enabled
   Target Milestone|---                         |11.4
   Last reconfirmed|                            |2022-05-02
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

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

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

* [Bug tree-optimization/105437] [11/12/13 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
  2022-05-02  6:47 ` [Bug tree-optimization/105437] [11/12/13 Regression] " rguenth at gcc dot gnu.org
@ 2022-05-02  8:43 ` cvs-commit at gcc dot gnu.org
  2022-05-02  8:44 ` [Bug tree-optimization/105437] [11/12 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-02  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:3a3eda000fdf4f8754c9a2535191091f1db0c2a2

commit r13-66-g3a3eda000fdf4f8754c9a2535191091f1db0c2a2
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 2 09:30:27 2022 +0200

    tree-optimization/105437 - BB vect with extern defs of throwing stmts

    We have to watch out for vectorized stmt insert locations if the
    def from the last stmt alters control flow.  We constrain region
    building so we know the def is outside of the current region
    and thus we can insert at the region start point.

    2022-05-02  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/105437
            * tree-vect-slp.cc (vect_schedule_slp_node): Handle the
            case where last_stmt alters control flow.

            * g++.dg/vect/pr105437.cc: New testcase.

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

* [Bug tree-optimization/105437] [11/12 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
  2022-05-02  6:47 ` [Bug tree-optimization/105437] [11/12/13 Regression] " rguenth at gcc dot gnu.org
  2022-05-02  8:43 ` [Bug tree-optimization/105437] [11/12/13 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4 cvs-commit at gcc dot gnu.org
@ 2022-05-02  8:44 ` rguenth at gcc dot gnu.org
  2022-05-06  9:27 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-02  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.3.1, 12.0
      Known to work|                            |13.0
            Summary|[11/12/13 Regression] ICE   |[11/12 Regression] ICE on
                   |on GIMPLE pass slp when     |GIMPLE pass slp when
                   |vectorizer is enabled since |vectorizer is enabled since
                   |r11-1801-g9e5508c2d006f2d4  |r11-1801-g9e5508c2d006f2d4

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

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

* [Bug tree-optimization/105437] [11/12 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
                   ` (2 preceding siblings ...)
  2022-05-02  8:44 ` [Bug tree-optimization/105437] [11/12 " rguenth at gcc dot gnu.org
@ 2022-05-06  9:27 ` cvs-commit at gcc dot gnu.org
  2022-06-02 10:56 ` [Bug tree-optimization/105437] [11 " cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-06  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:30b5b785abfff334bb50d7fd2051e991324f051f

commit r12-8342-g30b5b785abfff334bb50d7fd2051e991324f051f
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 2 09:30:27 2022 +0200

    tree-optimization/105437 - BB vect with extern defs of throwing stmts

    We have to watch out for vectorized stmt insert locations if the
    def from the last stmt alters control flow.  We constrain region
    building so we know the def is outside of the current region
    and thus we can insert at the region start point.

    2022-05-02  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/105437
            * tree-vect-slp.cc (vect_schedule_slp_node): Handle the
            case where last_stmt alters control flow.

            * g++.dg/vect/pr105437.cc: New testcase.

    (cherry picked from commit 3a3eda000fdf4f8754c9a2535191091f1db0c2a2)

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

* [Bug tree-optimization/105437] [11 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
                   ` (3 preceding siblings ...)
  2022-05-06  9:27 ` cvs-commit at gcc dot gnu.org
@ 2022-06-02 10:56 ` cvs-commit at gcc dot gnu.org
  2022-06-02 10:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-06-02 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:462e7e2c6fe0bc57e03110d43a2c7e53a1ce04ea

commit r11-10045-g462e7e2c6fe0bc57e03110d43a2c7e53a1ce04ea
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 2 09:30:27 2022 +0200

    tree-optimization/105437 - BB vect with extern defs of throwing stmts

    We have to watch out for vectorized stmt insert locations if the
    def from the last stmt alters control flow.  We constrain region
    building so we know the def is outside of the current region
    and thus we can insert at the region start point.

    2022-05-02  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/105437
            * tree-vect-slp.c (vect_schedule_slp_node): Handle the
            case where last_stmt alters control flow.

            * g++.dg/vect/pr105437.cc: New testcase.

    (cherry picked from commit 3a3eda000fdf4f8754c9a2535191091f1db0c2a2)

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

* [Bug tree-optimization/105437] [11 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
                   ` (4 preceding siblings ...)
  2022-06-02 10:56 ` [Bug tree-optimization/105437] [11 " cvs-commit at gcc dot gnu.org
@ 2022-06-02 10:57 ` rguenth at gcc dot gnu.org
  2024-03-11 22:24 ` cvs-commit at gcc dot gnu.org
  2024-03-11 22:45 ` cvs-commit at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-06-02 10:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Known to fail|11.3.1                      |11.3.0
      Known to work|                            |11.3.1
             Status|ASSIGNED                    |RESOLVED

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

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

* [Bug tree-optimization/105437] [11 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
                   ` (5 preceding siblings ...)
  2022-06-02 10:57 ` rguenth at gcc dot gnu.org
@ 2024-03-11 22:24 ` cvs-commit at gcc dot gnu.org
  2024-03-11 22:45 ` cvs-commit at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-11 22:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jerry DeLisle <jvdelisle@gcc.gnu.org>:

https://gcc.gnu.org/g:0c179654c3170749f3fb3232f2442fcbc99bffbb

commit r14-9432-g0c179654c3170749f3fb3232f2442fcbc99bffbb
Author: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date:   Mon Mar 11 15:15:34 2024 -0700

    libgfortran: [PR114304] Revert portion of PR105347 change.

            PR libfortran/105437
            PR libfortran/114304

    libgfortran/ChangeLog:

            * io/list_read.c (eat_separator): Remove check for decimal
            point mode and semicolon used as a seprator. Removes
            the regression.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pr105473.f90: Add additional checks to address
            the case of semicolon at the end of a line.

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

* [Bug tree-optimization/105437] [11 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4
  2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
                   ` (6 preceding siblings ...)
  2024-03-11 22:24 ` cvs-commit at gcc dot gnu.org
@ 2024-03-11 22:45 ` cvs-commit at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-11 22:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jerry DeLisle
<jvdelisle@gcc.gnu.org>:

https://gcc.gnu.org/g:824a71f609b37a8121793075b175e2bbe14fdb82

commit r13-8417-g824a71f609b37a8121793075b175e2bbe14fdb82
Author: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date:   Mon Mar 11 15:15:34 2024 -0700

    libgfortran: [PR114304] Revert portion of PR105347 change.

            PR libfortran/105437
            PR libfortran/114304

    libgfortran/ChangeLog:

            * io/list_read.c (eat_separator): Remove check for decimal
            point mode and semicolon used as a seprator. Removes
            the regression.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pr105473.f90: Add additional checks to address
            the case of semicolon at the end of a line.

    (cherry picked from commit 0c179654c3170749f3fb3232f2442fcbc99bffbb)

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

end of thread, other threads:[~2024-03-11 22:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 21:19 [Bug tree-optimization/105437] New: ICE on GIMPLE pass slp when vectorizer is enabled giuliano.belinassi at gmail dot com
2022-05-02  6:47 ` [Bug tree-optimization/105437] [11/12/13 Regression] " rguenth at gcc dot gnu.org
2022-05-02  8:43 ` [Bug tree-optimization/105437] [11/12/13 Regression] ICE on GIMPLE pass slp when vectorizer is enabled since r11-1801-g9e5508c2d006f2d4 cvs-commit at gcc dot gnu.org
2022-05-02  8:44 ` [Bug tree-optimization/105437] [11/12 " rguenth at gcc dot gnu.org
2022-05-06  9:27 ` cvs-commit at gcc dot gnu.org
2022-06-02 10:56 ` [Bug tree-optimization/105437] [11 " cvs-commit at gcc dot gnu.org
2022-06-02 10:57 ` rguenth at gcc dot gnu.org
2024-03-11 22:24 ` cvs-commit at gcc dot gnu.org
2024-03-11 22:45 ` cvs-commit 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).