public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103818] New: ICE: in insert, at ipa-modref-tree.c:591
@ 2021-12-23 16:10 k.even-mendoza at imperial dot ac.uk
  2021-12-23 19:52 ` [Bug ipa/103818] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: k.even-mendoza at imperial dot ac.uk @ 2021-12-23 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103818
           Summary: ICE: in insert, at ipa-modref-tree.c:591
           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: ---

The following code fails with -O1, -O2, -O3, and -Os in GCC-12, but works fine
with -O0: 

struct a {
  int b[0]
} c(struct a *d) {
  d->b[0] = d->b[-144115188075855873] + d->b[11] * d->b[2] +
            d->b[0] % d->b[1025] + d->b[5];
  d->b[0] =
      d->b[144678138029277184] + d->b[0] & d->b[-3] * d->b[053] + d->b[7] ^
      d->b[-9] + d->b[14] + d->b[9] % d->b[49] + d->b[024] + d->b[82] &
          d->b[4096];
}
void main() {}


It works fine with GCC-11. 

===
The trace in GCC-12 Version is:
/home/user42/data/gcc-csmith-1223/gcc-install/bin/gcc -O2 fuzzer-file-14593.c
fuzzer-file-14593.c:3:1: warning: no semicolon at end of struct or union
    3 | } c(struct a *d) {
      | ^
during GIMPLE pass: modref
fuzzer-file-14593.c: In function ‘c’:
fuzzer-file-14593.c:11:1: internal compiler error: in insert, at
ipa-modref-tree.c:591
   11 | void main() {}
      | ^~~~
0x73439f modref_access_node::insert(vec<modref_access_node, va_gc, vl_embed>*&,
modref_access_node, unsigned long, bool)
        .././../gcc-source/gcc/ipa-modref-tree.c:591
0xcc201a modref_ref_node<int>::insert_access(modref_access_node, unsigned long,
bool)
        .././../gcc-source/gcc/ipa-modref-tree.h:194
0xcc201a modref_tree<int>::insert(unsigned int, unsigned int, unsigned int,
int, int, modref_access_node, bool)
        .././../gcc-source/gcc/ipa-modref-tree.h:445
0xcb303c modref_tree<int>::insert(tree_node*, int, int, modref_access_node
const&, bool)
        .././../gcc-source/gcc/ipa-modref-tree.h:472
0xcb303c record_access
        .././../gcc-source/gcc/ipa-modref.c:1076
0xcb3968 analyze_load
        .././../gcc-source/gcc/ipa-modref.c:1707
0xc09dd1 walk_stmt_load_store_addr_ops(gimple*, void*, bool (*)(gimple*,
tree_node*, tree_node*, void*), bool (*)(gimple*, tree_node*, tree_node*,
void*), bool (*)(gimple*, tree_node*, tree_node*, void*))
        .././../gcc-source/gcc/gimple-walk.c:800
0xcbc7a1 analyze_stmt
        .././../gcc-source/gcc/ipa-modref.c:1788
0xcbc7a1 analyze
        .././../gcc-source/gcc/ipa-modref.c:1900
0xcbc7a1 analyze_function
        .././../gcc-source/gcc/ipa-modref.c:3219
0xcbec2a execute
        .././../gcc-source/gcc/ipa-modref.c:4186
Please submit a full bug report,
===

I tested it with gcc (GCC) 12.0.0 20211023 (experimental), gcc (GCC) 12.0.0
20211216 (experimental), and gcc (GCC) 12.0.0 20211223 (experimental) (current
version: commit ef26c151c14a87177d46fd3d725e7f82e040e89f) checking the fix of
bugs 102687 and 103073 there.

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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 16:10 [Bug c/103818] New: ICE: in insert, at ipa-modref-tree.c:591 k.even-mendoza at imperial dot ac.uk
2021-12-23 19:52 ` [Bug ipa/103818] [12 Regression] " pinskia at gcc dot gnu.org
2021-12-28 10:22 ` [Bug ipa/103818] [12 Regression] ICE: in insert, at ipa-modref-tree.c:591 since r12-3202-gf5ff3a8ed4ca9173 marxin at gcc dot gnu.org
2022-01-26 13:39 ` marxin at gcc dot gnu.org
2022-01-26 13:39 ` marxin at gcc dot gnu.org
2022-04-09 20:25 ` hubicka at gcc dot gnu.org
2022-04-11 16:00 ` jakub at gcc dot gnu.org
2022-04-12 10:50 ` hubicka at kam dot mff.cuni.cz
2022-04-20  9:01 ` cvs-commit at gcc dot gnu.org
2022-04-20  9:11 ` hubicka 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).