public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101249] New: ICE: Segmentation fault with "-O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-strict-aliasing -fwrapv"
@ 2021-06-29  8:01 suochenyao at 163 dot com
  2021-06-29  8:13 ` [Bug tree-optimization/101249] " marxin at gcc dot gnu.org
  2021-06-29  8:36 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: suochenyao at 163 dot com @ 2021-06-29  8:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101249
           Summary: ICE: Segmentation fault with "-O3 -fno-tree-ch
                    -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse
                    -fno-strict-aliasing -fwrapv"
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: suochenyao at 163 dot com
  Target Milestone: ---

*******************************************************************************
OS and Platform:
CentOS Linux release 7.8.2003 (Core), x86_64 GNU/Linux
*******************************************************************************
Program:
unsigned a[];
char b=0, c=0;
int d=0;
void e() {
  int f, g;
  for (; b; b++) {
    c = 0;
    for (; c <= 8; c++) {
      int *h = &f;
      *h |= a[c];
      g = *h = a[c];
    }
    d = g;
  }
}
int main() {}
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/data/bin/gcc-dev/bin/gcc
COLLECT_LTO_WRAPPER=/data/bin/gcc-dev/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/data/bin/gcc-dev --disable-multilib
--enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210628 (experimental) (GCC)

git version: 7c6b354b92b38f31cd2399fbdbc9d6f837881480
*******************************************************************************
Command Lines:
$ gcc -O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse
-fno-strict-aliasing -fwrapv a.c
a.c:1:10: warning: array ‘a’ assumed to have one element
    1 | unsigned a[];
      |          ^
a.c: In function ‘e’:
a.c:10:14: warning: iteration 1 invokes undefined behavior
[-Waggressive-loop-optimizations]
   10 |       *h |= a[c];
      |             ~^~~
a.c:8:14: note: within this loop
    8 |     for (; c <= 8; c++) {
      |            ~~^~~~
during GIMPLE pass: slp
a.c:4:6: internal compiler error: Segmentation fault
    4 | void e() {
      |      ^
0xe3a99f crash_signal
        ../../gcc/toplev.c:328
0x10e1b47 vec<_stmt_vec_info*, va_heap, vl_ptr>::iterate(unsigned int,
_stmt_vec_info**) const
        ../../gcc/vec.h:1697
0x10e1b47 vect_optimize_slp(vec_info*)
        ../../gcc/tree-vect-slp.c:3992
0x10e9c5c vect_optimize_slp(vec_info*)
        ../../gcc/vec.h:1448
0x10e9c5c vect_slp_analyze_bb_1
        ../../gcc/tree-vect-slp.c:5621
0x10e9c5c vect_slp_region
        ../../gcc/tree-vect-slp.c:5708
0x10eb2c8 vect_slp_bbs
        ../../gcc/tree-vect-slp.c:5858
0x10eb6c4 vect_slp_function(function*)
        ../../gcc/tree-vect-slp.c:5944
0x10f1712 execute
        ../../gcc/tree-vectorizer.c:1445
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] 3+ messages in thread

* [Bug tree-optimization/101249] ICE: Segmentation fault with "-O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-strict-aliasing -fwrapv"
  2021-06-29  8:01 [Bug tree-optimization/101249] New: ICE: Segmentation fault with "-O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-strict-aliasing -fwrapv" suochenyao at 163 dot com
@ 2021-06-29  8:13 ` marxin at gcc dot gnu.org
  2021-06-29  8:36 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-29  8:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-06-29
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Very likely dup of PR101242. Started with the same revision.

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

* [Bug tree-optimization/101249] ICE: Segmentation fault with "-O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-strict-aliasing -fwrapv"
  2021-06-29  8:01 [Bug tree-optimization/101249] New: ICE: Segmentation fault with "-O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-strict-aliasing -fwrapv" suochenyao at 163 dot com
  2021-06-29  8:13 ` [Bug tree-optimization/101249] " marxin at gcc dot gnu.org
@ 2021-06-29  8:36 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-29  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
dup indeed.

*** This bug has been marked as a duplicate of bug 101242 ***

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

end of thread, other threads:[~2021-06-29  8:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29  8:01 [Bug tree-optimization/101249] New: ICE: Segmentation fault with "-O3 -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-strict-aliasing -fwrapv" suochenyao at 163 dot com
2021-06-29  8:13 ` [Bug tree-optimization/101249] " marxin at gcc dot gnu.org
2021-06-29  8:36 ` 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).