public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "yagi.uwu at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/95152] ICE in get_or_create_mem_ref, at analyzer/region-model.cc:6938 since r10-5950-g757bf1dff5e8cee3
Date: Tue, 02 Jun 2020 06:37:01 +0000	[thread overview]
Message-ID: <bug-95152-4-XAWkZgwmdn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95152-4@http.gcc.gnu.org/bugzilla/>

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

  parent reply	other threads:[~2020-06-02  6:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 12:45 [Bug analyzer/95152] New: internal compiler error: in get_or_create_mem_ref, at analyzer/region-model.cc:6938 pieter+gcc-bugzilla at plexis dot eu
2020-05-15 13:26 ` [Bug analyzer/95152] " marxin at gcc dot gnu.org
2020-05-16  8:40 ` fredrik.hederstierna@securitas-direct.com
2020-05-18  5:40 ` [Bug analyzer/95152] ICE in get_or_create_mem_ref, at analyzer/region-model.cc:6938 since r10-5950-g757bf1dff5e8cee3 marxin at gcc dot gnu.org
2020-05-18  6:52 ` fredrik.hederstierna@securitas-direct.com
2020-06-02  6:37 ` yagi.uwu at gmail dot com [this message]
2020-08-21  1:16 ` cvs-commit at gcc dot gnu.org
2020-08-21  1:21 ` dmalcolm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-95152-4-XAWkZgwmdn@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).