public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pmatos at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/94688] New: ice caused by analyzer
Date: Tue, 21 Apr 2020 12:10:37 +0000	[thread overview]
Message-ID: <bug-94688-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 94688
           Summary: ice caused by analyzer
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: pmatos at gcc dot gnu.org
  Target Milestone: ---

While reducing a testcase for a separate bug I found an analyzer ice.

///
a, b;
c() { d((void (*)()) & a + b); }
/// 

Compiled with todays (2020.04.21) head:
  gcc -O2 -g -fanalyzer  -Wall   -I./.. -I./../include -I./../../rktio
-I../../rktio -pthread -I/usr/lib64/libffi/include   -DUSE_SENORA_GC    -c
foreign.i -o foreign.o
foreign.i:1:1: warning: data definition has no type or storage class
    1 | a, b;
      | ^
foreign.i:1:1: warning: type defaults to 'int' in declaration of 'a'
[-Wimplicit-int]
foreign.i:1:4: warning: type defaults to 'int' in declaration of 'b'
[-Wimplicit-int]
    1 | a, b;
      |    ^
foreign.i:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
    2 | c() { d((void (*)()) & a + b); }
      | ^
foreign.i: In function 'c':
foreign.i:2:7: warning: implicit declaration of function 'd'
[-Wimplicit-function-declaration]
    2 | c() { d((void (*)()) & a + b); }
      |       ^
foreign.i:2:32: warning: control reaches end of non-void function
[-Wreturn-type]
    2 | c() { d((void (*)()) & a + b); }
      |                                ^
during IPA pass: analyzer
foreign.i:2:7: internal compiler error: in get_or_create_mem_ref, at
analyzer/region-model.cc:6969
    2 | c() { d((void (*)()) & a + b); }
      |       ^
0x763ce6 ana::region_model::get_or_create_mem_ref(tree_node*, ana::svalue_id,
ana::svalue_id, ana::region_model_context*)
        ../../gcc/gcc/analyzer/region-model.cc:6969
0x11c9585 ana::region_model::get_or_create_pointer_plus_expr(tree_node*,
ana::svalue_id, ana::svalue_id, ana::region_model_context*)
        ../../gcc/gcc/analyzer/region-model.cc:7058
0x11c9585 ana::region_model::on_assignment(gassign const*,
ana::region_model_context*)
        ../../gcc/gcc/analyzer/region-model.cc:4237
0x119bee2 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*, ana::state_change*) const
        ../../gcc/gcc/analyzer/engine.cc:1019
0x119c841 ana::exploded_graph::process_node(ana::exploded_node*)
        ../../gcc/gcc/analyzer/engine.cc:2530
0x119ccb2 ana::exploded_graph::process_worklist()
        ../../gcc/gcc/analyzer/engine.cc:2348
0x119f07e ana::impl_run_checkers(ana::logger*)
        ../../gcc/gcc/analyzer/engine.cc:4029
0x11a0a7c ana::run_checkers()
        ../../gcc/gcc/analyzer/engine.cc:4097
0x1194808 execute
        ../../gcc/gcc/analyzer/analyzer-pass.cc:84
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.



However without the -fanalyzer flag it compiles and returns exit code 0.

             reply	other threads:[~2020-04-21 12:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 12:10 pmatos at gcc dot gnu.org [this message]
2020-04-21 13:30 ` [Bug analyzer/94688] ICE caused by analyzer since r10-7502-ga96f1c38a787fbc8 marxin at gcc dot gnu.org
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-07-23  6:52 ` rguenth at gcc dot gnu.org
2020-08-13 20:32 ` 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-94688-4@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).