public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/100512] New: [12 Regression] ICE during GIMPLE pass: cddce in mark_operand_necessary, at tree-ssa-dce.c:173  (under -O2 to -Os)
@ 2021-05-11  3:12 haoxintu at gmail dot com
  2021-05-11  3:41 ` [Bug tree-optimization/100512] " haoxintu at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: haoxintu at gmail dot com @ 2021-05-11  3:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100512
           Summary: [12 Regression] ICE during GIMPLE pass: cddce in
                    mark_operand_necessary, at tree-ssa-dce.c:173  (under
                    -O2 to -Os)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi all.

$cat small.c
#include <stdint.h>
int a;
void b() {
  int16_t *c;
  uint16_t d = 2;
  if (0 == d) {
    uint64_t e;
    uint64_t *f = &e;
    for (;;) {
      if (e += 0 >= 0)
        for (;;)
          ;
    g:
      for (; a;) {
        int16_t i = &d;
        *c = i && *f;
      }
    }
  }
  goto g;
}


$gcc -w -O2 
during GIMPLE pass: cddce
small.c: In function ‘b’:
small.c:21:1: internal compiler error: in mark_operand_necessary, at
tree-ssa-dce.c:173
   21 | }
      | ^
0x65b30e mark_operand_necessary
        ../../gcc/tree-ssa-dce.c:173
0xc86d76 propagate_necessity
        ../../gcc/tree-ssa-dce.c:852
0xc86d76 perform_tree_ssa_dce
        ../../gcc/tree-ssa-dce.c:1673
0xc887d5 tree_ssa_cd_dce
        ../../gcc/tree-ssa-dce.c:1717
0xc887d5 execute
        ../../gcc/tree-ssa-dce.c:1789
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.
tuhaoxin@oscar-2020:~/dut-research/covsmith-test/20210502$ cat small.c
#include <stdint.h>
int a;
void b() {
  int16_t *c;
  uint16_t d = 2;
  if (0 == d) {
    uint64_t e;
    uint64_t *f = &e;
    for (;;) {
      if (e += 0 >= 0)
        for (;;)
          ;
    g:
      for (; a;) {
        int16_t i = &d;
        *c = i && *f;
      }
    }
  }
  goto g;
}

$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/tuhaoxin/compilers/gcc/build/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/tuhaoxin/compilers/gcc/build/
--enable-bootstrap --enable-checking=release --enable-languages=c,c++
-disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210510 (experimental) (GCC) 

This crash only exists in the current trunk version of GCC, and the released
versions perform well. I also tested it on an earlier GCC trunk built on
20210425, it does not crash as well. So I think it's a regression issue in
GCC-12.


Thanks,
Haoxin

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

end of thread, other threads:[~2021-05-18  7:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11  3:12 [Bug tree-optimization/100512] New: [12 Regression] ICE during GIMPLE pass: cddce in mark_operand_necessary, at tree-ssa-dce.c:173 (under -O2 to -Os) haoxintu at gmail dot com
2021-05-11  3:41 ` [Bug tree-optimization/100512] " haoxintu at gmail dot com
2021-05-11  7:24 ` rguenth at gcc dot gnu.org
2021-05-11  8:06 ` [Bug tree-optimization/100512] [12 Regression] ICE during GIMPLE pass: cddce in mark_operand_necessary, at tree-ssa-dce.c:173 (under -O2 to -Os) since r12-623-g1416a1434c43de0b marxin at gcc dot gnu.org
2021-05-11 19:43 ` aldyh at gcc dot gnu.org
2021-05-13 19:59 ` aldyh at gcc dot gnu.org
2021-05-17 13:21 ` aldyh at gcc dot gnu.org
2021-05-17 20:34 ` amacleod at redhat dot com
2021-05-17 22:13 ` cvs-commit at gcc dot gnu.org
2021-05-18  7:30 ` marxin 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).