https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95152
yagi uwu <yagi.uwu at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yagi.uwu at gmail dot com --- Comment #5 from yagi uwu <yagi.uwu at gmail dot com> --- Hello, i too got an error that seems to be the same as yours, but i accidentally managed to find a simple example, so i am showing it with the hope it can help find the bug. The source file fits here: void foo(void) { // the size does not seem relevant // the parameters do not either // nor do the return types void (*a[1]) (); void (*p) () = a + 1; // <- the error happens here // the amount add does not seem to matter, // but it needs to be different to 0 } My system is under linux mint. This is what /home/yagigami/gcc-installs/usr/local/bin/gcc -v shows: Using built-in specs. COLLECT_GCC=/home/yagigami/gcc-installs/usr/local/bin/gcc COLLECT_LTO_WRAPPER=/home/yagigami/gcc-installs/usr/local/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/configure --enable-languages=c,c++ Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.1.0 (GCC) This is the error message: during IPA pass: analyzer bug.c:7:26: internal compiler error: in get_or_create_mem_ref, at analyzer/region-model.cc:6932 7 | void (*p) () = a + 1; | ~~^~~ 0x5f84d9 ana::region_model::get_or_create_mem_ref(tree_node*, ana::svalue_id, ana::svalue_id, ana::region_model_context*) /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/region-model.cc:6932 0xe02bf7 ana::region_model::get_or_create_pointer_plus_expr(tree_node*, ana::svalue_id, ana::svalue_id, ana::region_model_context*) /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/region-model.cc:7021 0xe02bf7 ana::region_model::on_assignment(gassign const*, ana::region_model_context*) /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/region-model.cc:4197 0xde6a6a ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::state_change*) const /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/engine.cc:1019 0xde73cf ana::exploded_graph::process_node(ana::exploded_node*) /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/engine.cc:2530 0xde781a ana::exploded_graph::process_worklist() /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/engine.cc:2348 0xde7f0b ana::impl_run_checkers(ana::logger*) /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/engine.cc:4029 0xde8a9c ana::run_checkers() /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/engine.cc:4097 0xdde058 execute /home/yagigami/gcc/release-10.1/gcc-releases-gcc-10.1.0/gcc/analyzer/analyzer-pass.cc:84