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

            Bug ID: 103073
           Summary: [12 Regression] ICE in insert_access, at
                    ipa-modref-tree.h:578
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskij at frtk dot ru
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

I'm not sure about the component. Would you mind checking and fixing it in case
it is wrong?

Link to the Compiler Explorer: https://godbolt.org/z/K17Grnez9

Reproducer:
int a;
void b(bool c[], char d[], bool g[][55][21]) {
  for (signed e = 0; e < 11; e += 3)
    for (unsigned f = c[0] + 1; f < d[0]; f += 3)
      a = g[0][e][f + 2];
}

Error:
>$ g++ -c func.cpp -O3
during GIMPLE pass: modref
func.cpp: In function 'void b(bool*, char*, bool (*)[55][21])':
func.cpp:2:6: internal compiler error: in insert_access, at
ipa-modref-tree.h:578
    2 | void b(bool c[], char d[], bool g[][55][21]) {
      |      ^
0x103ae7a modref_ref_node<int>::insert_access(modref_access_node, unsigned
long, bool)
        /testing/gcc/gcc_src_master/gcc/ipa-modref-tree.h:578
0x103b16d modref_tree<int>::insert(int, int, modref_access_node, bool)
        /testing/gcc/gcc_src_master/gcc/ipa-modref-tree.h:848
0x102cafe record_access
        /testing/gcc/gcc_src_master/gcc/ipa-modref.c:758
0x102d7ff analyze_load
        /testing/gcc/gcc_src_master/gcc/ipa-modref.c:1262
0xf84246 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*))
        /testing/gcc/gcc_src_master/gcc/gimple-walk.c:800
0x1034872 analyze_stmt
        /testing/gcc/gcc_src_master/gcc/ipa-modref.c:1313
0x1034872 analyze_function
        /testing/gcc/gcc_src_master/gcc/ipa-modref.c:2366
0x1035e21 execute
        /testing/gcc/gcc_src_master/gcc/ipa-modref.c:3213
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.

GCC version:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/testing/gcc/bin_master/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /testing/gcc/gcc_src_master/configure --enable-multilib
--prefix=/testing/gcc/bin_master --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211103 (62af7d9402f551fa708125fafed2950d8912b25e) (GCC)

Reply via email to