public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103816] New: ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1748
@ 2021-12-23 14:11 k.even-mendoza at imperial dot ac.uk
  2021-12-23 14:54 ` [Bug tree-optimization/103816] [12 Regression] ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1748 since r12-1551-g3dfa4fe9f1a089b2 marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: k.even-mendoza at imperial dot ac.uk @ 2021-12-23 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103816
           Summary: ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1748
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: k.even-mendoza at imperial dot ac.uk
  Target Milestone: ---

This program crashed with GCC-12 with -O2 and -O3:

typedef enum { e } f;
struct {
  f __attribute__((mode(__byte__))) a;
  f __attribute__((mode(__byte__))) b;
  f __attribute__((mode(__byte__))) c;
  f __attribute__((mode(__byte__))) d
} g[];
void main() { g[0].b = (g[0].b & g[4].b) * g[2305843009213693952].c; }


This code works fine with GCC-11. I tried several versions of GCC-12: 20211023,
20211118, and 20211216 on Ubuntu-18.

The trace looks like this:
===
fuzzer-file-54092.c:7:1: warning: no semicolon at end of struct or union
    7 | } g[];
      | ^
fuzzer-file-54092.c:7:3: warning: array ‘g’ assumed to have one element
    7 | } g[];
      |   ^
during GIMPLE pass: slp
fuzzer-file-54092.c: In function ‘main’:
fuzzer-file-54092.c:8:6: internal compiler error: in vect_build_slp_tree_2, at
tree-vect-slp.c:1748
    8 | void main() { g[0].b = (g[0].b & g[4].b) * g[2305843009213693952].c; }
      |      ^~~~
0x7d2c1c vect_build_slp_tree_2
        .././../gcc-source/gcc/tree-vect-slp.c:1748
0x119b89d vect_build_slp_tree
        .././../gcc-source/gcc/tree-vect-slp.c:1549
0x119fe30 vect_build_slp_instance
        .././../gcc-source/gcc/tree-vect-slp.c:3025
0x11a5966 vect_analyze_slp(vec_info*, unsigned int)
        .././../gcc-source/gcc/tree-vect-slp.c:3388
0x11aa0ea vect_slp_analyze_bb_1
        .././../gcc-source/gcc/tree-vect-slp.c:5762
0x11aa0ea vect_slp_region
        .././../gcc-source/gcc/tree-vect-slp.c:5864
0x11aa0ea vect_slp_bbs
        .././../gcc-source/gcc/tree-vect-slp.c:6056
0x11ac131 vect_slp_function(function*)
        .././../gcc-source/gcc/tree-vect-slp.c:6144
0x11b36e2 execute
        .././../gcc-source/gcc/tree-vectorizer.c:1503
Please submit a full bug report,

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

end of thread, other threads:[~2022-01-05 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 14:11 [Bug c/103816] New: ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1748 k.even-mendoza at imperial dot ac.uk
2021-12-23 14:54 ` [Bug tree-optimization/103816] [12 Regression] ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1748 since r12-1551-g3dfa4fe9f1a089b2 marxin at gcc dot gnu.org
2022-01-03 13:28 ` rguenth at gcc dot gnu.org
2022-01-05  9:07 ` rguenth at gcc dot gnu.org
2022-01-05 10:56 ` cvs-commit at gcc dot gnu.org
2022-01-05 11:04 ` 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).