From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2FF2C386F44A; Mon, 18 May 2020 05:40:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FF2C386F44A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589780450; bh=y+86JIaQNvlqtVswvcwyn5jqcW2i6/5U5xDFNcAz6so=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UXhxlW/1I7mFZfmg1ioo0M5uq0bRFUEvBpE9y2QSubkvCGWG/D7Q6kC6S6nVd/a1h 7Dt9MiJrQDRxyA4nEaVJ/RbdH9GOrBzhlmGjRuPVh43uFvDoi2qeMkKnUbARsMcB/2 ofTmiSbXJsCGs3n0Tzz7AMD/cdR9PWU9sn7ssLzA= From: "marxin at gcc dot 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: Mon, 18 May 2020 05:40:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status keywords short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2020 05:40:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95152 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Keywords|needs-bisection, | |needs-reduction | Summary|internal compiler error: in |ICE in |get_or_create_mem_ref, at |get_or_create_mem_ref, at |analyzer/region-model.cc:69 |analyzer/region-model.cc:69 |38 |38 since | |r10-5950-g757bf1dff5e8cee3 --- Comment #3 from Martin Li=C5=A1ka --- Reduced test-case: $ struct n; class o { public: using d =3D n; d operator*(); }; class p { public: p(char *); void operator=3D(p); }; template class q { public: ad operator*(); }; void(ag)(int(int *)); auto a =3D [] {}; int f, g; class r { public: template void k(p aj, j i::*ak) { auto b =3D [=3D](i am, j c) { am.*ak =3D c; }; k(aj, a, b); } template void k(p aj, an, ao ap) { aq(aj, 0, ap); } int as; template struct s {}; template void ay(int *az, int, p, ax ba) { t::bc(az, ba); } template void aq(p aj, an, ao ap) { ay(&as, 4, aj, [ap](o bj, p c) { ap(*bj, c); }); } template struct t; template struct I { static auto bn(int *, int) -> q; }; template static auto bp(int *, bo, l bq, int) { bq(); } template static auto bp(int *az, bo bt, l bq, int bu, s
, bs... bv) { auto c =3D I
::bn(az, bu); J d{bq, *c}; bp(az, bt, d, 1, bv...); } template struct J { by ca; bz cb; template void operator()(cc... cd) { ca(cb, cd...); } }; }; template struct r::t { template static auto bc(int *, by) { auto e =3D [](int *) -> int { bq(static_cast(0)); }; ag(e); } template static auto bq(by ch) { cj(*ch); } template static auto cj(by ch) { bp(&g, int{}, ch, f, s{}...); } }; struct n { p aj; }; r h; void m() { h.k("", &n::aj); } $ g++ -fanalyzer x.ii -c -O3 x.ii: In lambda function: x.ii:55:59: warning: no return statement in function returning non-void [-Wreturn-type] 55 | auto e =3D [](int *) -> int { bq(static_cast(0)); }; | ^ x.ii: In function =E2=80=98void m()=E2=80=99: x.ii:67:16: warning: ISO C++ forbids converting a string constant to =E2=80= =98char*=E2=80=99 [-Wwrite-strings] 67 | void m() { h.k("", &n::aj); } | ^~ during IPA pass: analyzer x.ii: In lambda function: x.ii:22:14: internal compiler error: in get_or_create_mem_ref, at analyzer/region-model.cc:6938 22 | auto b =3D [=3D](i am, j c) { am.*ak =3D c; }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x86fc20 ana::region_model::get_or_create_mem_ref(tree_node*, ana::svalue_i= d, ana::svalue_id, ana::region_model_context*) /home/marxin/Programming/gcc/gcc/analyzer/region-model.cc:6938 0x1448285 ana::region_model::get_or_create_pointer_plus_expr(tree_node*, ana::svalue_id, ana::svalue_id, ana::region_model_context*) /home/marxin/Programming/gcc/gcc/analyzer/region-model.cc:7021 0x1448285 ana::region_model::on_assignment(gassign const*, ana::region_model_context*) /home/marxin/Programming/gcc/gcc/analyzer/region-model.cc:4197 0x141c12f ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::state_change*) const /home/marxin/Programming/gcc/gcc/analyzer/engine.cc:1019 0x141ca31 ana::exploded_graph::process_node(ana::exploded_node*) /home/marxin/Programming/gcc/gcc/analyzer/engine.cc:2530 0x141ce82 ana::exploded_graph::process_worklist() /home/marxin/Programming/gcc/gcc/analyzer/engine.cc:2348 0x141f0de ana::impl_run_checkers(ana::logger*) /home/marxin/Programming/gcc/gcc/analyzer/engine.cc:4029 0x1420abc ana::run_checkers() /home/marxin/Programming/gcc/gcc/analyzer/engine.cc:4097 0x1414ea8 execute /home/marxin/Programming/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 for instructions.=