public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97753] New: ice in operator[], at vec.h:880
@ 2020-11-07 17:56 dcb314 at hotmail dot com
  2020-11-09  8:09 ` [Bug tree-optimization/97753] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2020-11-07 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97753
           Summary: ice in operator[], at vec.h:880
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ code:

long a[6];
void d() {
  for (int c; c; c++)
    for (int b = 0; b < 8; b++)
      ((char *)&a[c])[b] = c;
}

compiled by recent gcc trunk and compiler flag -O3, does this:

during GIMPLE pass: vect
bug669.cc: In function ‘void d()’:
bug669.cc:2:6: internal compiler error: in operator[], at vec.h:880
    2 | void d() {
      |      ^
0x861070 vec<_slp_tree*, va_heap, vl_embed>::operator[](unsigned int)
        ../../trunk.git/gcc/vec.h:880
0x861070 vec<_slp_tree*, va_heap, vl_ptr>::operator[](unsigned int)
        ../../trunk.git/gcc/vec.h:1451
0x861070 vectorizable_induction(_loop_vec_info*, _stmt_vec_info*, gimple**,
_slp
_tree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        ../../trunk.git/gcc/tree-vect-loop.c:7929
0x1487820 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*,
 _slp_tree*, _slp_instance*)
        ../../trunk.git/gcc/tree-vect-stmts.c:10782

The problem first seems to appear sometime between 20201104 and 20201105.

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

* [Bug tree-optimization/97753] ice in operator[], at vec.h:880
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
@ 2020-11-09  8:09 ` rguenth at gcc dot gnu.org
  2020-11-09  8:10 ` [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759 marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-09  8:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-11-09
            Version|unknown                     |11.0
             Status|UNCONFIRMED                 |ASSIGNED
          Component|c++                         |tree-optimization

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
  2020-11-09  8:09 ` [Bug tree-optimization/97753] " rguenth at gcc dot gnu.org
@ 2020-11-09  8:10 ` marxin at gcc dot gnu.org
  2020-11-09  8:54 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-09  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.0
           Keywords|                            |ice-on-valid-code
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
             Status|ASSIGNED                    |NEW
   Target Milestone|---                         |11.0
           Priority|P3                          |P1
      Known to work|                            |10.2.0
            Summary|ice in operator[], at       |ICE in operator[], at
                   |vec.h:880                   |vec.h:880 since
                   |                            |r11-4714-g092cdbd919849759

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-4714-g092cdbd919849759.

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

* [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
  2020-11-09  8:09 ` [Bug tree-optimization/97753] " rguenth at gcc dot gnu.org
  2020-11-09  8:10 ` [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759 marxin at gcc dot gnu.org
@ 2020-11-09  8:54 ` marxin at gcc dot gnu.org
  2020-11-09  8:56 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-09  8:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 97763 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-11-09  8:54 ` marxin at gcc dot gnu.org
@ 2020-11-09  8:56 ` marxin at gcc dot gnu.org
  2020-11-09 12:28 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-09  8:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Maybe a bit different backtrace:

$ cat trigger.i
typedef struct {
  _Bool trig_insert_before_row;
  _Bool trig_insert_after_row;
  _Bool trig_insert_instead_row;
  _Bool trig_insert_before_statement;
  _Bool trig_insert_after_statement;
  _Bool trig_update_before_row;
  _Bool trig_update_after_row;
  _Bool trig_update_instead_row;
  _Bool trig_update_before_statement;
  _Bool trig_update_after_statement;
  _Bool trig_delete_before_row;
  _Bool trig_delete_after_row;
  _Bool trig_delete_instead_row;
  _Bool trig_delete_before_statement;
  _Bool trig_delete_after_statement;
  _Bool trig_truncate_before_statement;
} TriggerDesc;

void SetTriggerFlags();

void
RelationBuildTriggers() {
  int i;
  for (; i; i++)
    SetTriggerFlags();
}

void
SetTriggerFlags(TriggerDesc *trigdesc) {
  short tgtype;
  trigdesc->trig_insert_before_row |= trigdesc->trig_insert_after_row |=
      trigdesc->trig_insert_instead_row |= tgtype == 0;
  trigdesc->trig_insert_before_statement |=
      trigdesc->trig_insert_after_statement |=
      trigdesc->trig_update_before_row |= trigdesc->trig_update_after_row |=
      trigdesc->trig_update_instead_row |=
      trigdesc->trig_update_before_statement |=
      trigdesc->trig_update_after_statement |=
      trigdesc->trig_delete_before_row |= trigdesc->trig_delete_after_row |=
      trigdesc->trig_delete_instead_row |=
      trigdesc->trig_delete_before_statement |=
      trigdesc->trig_delete_after_statement |=
      trigdesc->trig_truncate_before_statement |= tgtype == 0;
}

$ gcc -O3 trigger.i  -c -fno-strict-aliasing
during GIMPLE pass: slp
trigger.i: In function ‘RelationBuildTriggers’:
trigger.i:23:1: internal compiler error: in operator[], at vec.h:880
   23 | RelationBuildTriggers() {
      | ^~~~~~~~~~~~~~~~~~~~~
0x732816 vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
        /home/marxin/Programming/gcc/gcc/vec.h:880
0x733364 vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
        /home/marxin/Programming/gcc/gcc/tree.h:3428
0x733364 vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
        /home/marxin/Programming/gcc/gcc/vec.h:1451
0x733364 vect_create_vectorized_demotion_stmts
        /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:4422
0x10245fb vectorizable_conversion
        /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:4993
0x10264d8 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:10776
0x105534c vect_schedule_slp_node
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5437
0x106071c vect_schedule_scc
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5599
0x106048f vect_schedule_scc
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5580
0x1060d07 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5715
0x106208c vect_slp_region
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4264
0x106208c vect_slp_bbs
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4374
0x1062e54 vect_slp_function(function*)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4460
0x1064cc6 execute
        /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1437
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.

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

* [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2020-11-09  8:56 ` marxin at gcc dot gnu.org
@ 2020-11-09 12:28 ` rguenth at gcc dot gnu.org
  2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
  2020-11-09 13:58 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-09 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2020-11-09 12:28 ` rguenth at gcc dot gnu.org
@ 2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
  2020-11-09 13:58 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-09 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:f5761c318a5a973ba2e4e5b09a5213f4e3ad0570

commit r11-4836-gf5761c318a5a973ba2e4e5b09a5213f4e3ad0570
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Nov 9 14:03:14 2020 +0100

    tree-optimization/97753 - fix SLP induction vect

    This fixes updating of the step vectors when filling up to group_size.

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

            PR tree-optimization/97753
            * tree-vect-loop.c (vectorizable_induction): Fill vec_steps
            when CSEing inside the group.

            * gcc.dg/vect/pr97753.c: New testcase.

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

* [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759
  2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
@ 2020-11-09 13:58 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-09 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-11-09 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 17:56 [Bug c++/97753] New: ice in operator[], at vec.h:880 dcb314 at hotmail dot com
2020-11-09  8:09 ` [Bug tree-optimization/97753] " rguenth at gcc dot gnu.org
2020-11-09  8:10 ` [Bug tree-optimization/97753] ICE in operator[], at vec.h:880 since r11-4714-g092cdbd919849759 marxin at gcc dot gnu.org
2020-11-09  8:54 ` marxin at gcc dot gnu.org
2020-11-09  8:56 ` marxin at gcc dot gnu.org
2020-11-09 12:28 ` rguenth at gcc dot gnu.org
2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
2020-11-09 13:58 ` 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).