public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101290] New: ICE with -O1 on valid code: in maybe_canonicalize_mem_ref_addr, at gimple-fold.c:5976
@ 2021-07-01 22:20 cnsun at uwaterloo dot ca
  2021-07-02  6:32 ` [Bug middle-end/101290] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-07-01 22:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101290
           Summary: ICE with -O1 on valid code: in
                    maybe_canonicalize_mem_ref_addr, at gimple-fold.c:5976
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210701 (experimental) [master revision
:b1f5e3e73:a688c284dd3848b6c4ea553035f0f9769fb4fbc9] (GCC)

$ cat mutant.c
typedef *a;
typedef struct {
  struct {
    struct {
      struct {
        struct {
          struct {
            struct {
              struct {
                struct {
                  struct {
                    struct {
                      struct {
                        struct {
                          struct {
                            struct {
                              struct {
                                struct {
                                  struct {
                                    struct {
                                      struct {
                                        struct {
                                          struct {
                                            struct {
                                              struct {
                                                struct {
                                                  struct {
                                                    struct {
                                                      struct {
                                                        unsigned b, c, d, e
                                                      } b, c, d, e, f
                                                    } b, c, d, e, f
                                                  } b, c, d, e, f
                                                } b, c, d, e, f
                                              } b, c, d, e, f
                                            } b, c, d, e, f
                                          } b, c, d, e, f
                                        } b, c, d, e, f
                                      } b, c, d, e, f
                                    } b, c, d, e, f
                                  } b, c, d, e, f
                                } b, c, d, e, f
                              } b, c, d, e, f
                            } b, c, d, e, f
                          } b, c, d, e, f
                        } b, c, d, e, f
                      } b, c, d, e, f
                    } b, c, d, e, f
                  } b, c, d, e, f
                } b, c, d, e, f
              } b, c, d, e, f
            } b, c, d, e, f
          } b, c, d, e, f
        } b, c, d, e, f
      } b, c, d, e, f
    } b, c, d, e, f
  } b, c, f
} * g;
int h;
struct i k;
struct i {
  a j
} l(struct i *m) {
  *(volatile *)&((g)m->j)->f;
}
n() {
  k.j = &h;
  l(&k);
}

$ gcc-trunk -w -O1 mutant.c
during GIMPLE pass: copyprop
mutant.c: In function ‘n’:
mutant.c:66:1: internal compiler error: in maybe_canonicalize_mem_ref_addr, at
gimple-fold.c:5976
   66 | n() {
      | ^
0x6def4a maybe_canonicalize_mem_ref_addr
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/gimple-fold.c:5976
0xc1f18a fold_stmt_1
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/gimple-fold.c:6085
0x10db4c6 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/tree-ssa-propagate.c:853
0x194d647 dom_walker::walk(basic_block_def*)
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/domwalk.c:309
0x10da869 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/tree-ssa-propagate.c:987
0x104726a fini_copy_prop
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/tree-ssa-copy.c:566
0x104726a execute_copy_prop
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/tree-ssa-copy.c:619
0x104726a execute
        /tmp/tmp.66z1mEqhUB-gcc-builder/gcc/gcc/tree-ssa-copy.c:649
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] 4+ messages in thread

end of thread, other threads:[~2021-07-06  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 22:20 [Bug tree-optimization/101290] New: ICE with -O1 on valid code: in maybe_canonicalize_mem_ref_addr, at gimple-fold.c:5976 cnsun at uwaterloo dot ca
2021-07-02  6:32 ` [Bug middle-end/101290] " rguenth at gcc dot gnu.org
2021-07-05 19:56 ` joseph at codesourcery dot com
2021-07-06  6:09 ` [Bug c/101290] " 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).