From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E05843858D28; Wed, 1 Dec 2021 06:24:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E05843858D28 From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103513] New: [12 Regression] ICE in evaluate_conditions_for_known_args, at ipa-fnsummary.c:516 with -O2 and above Date: Wed, 01 Dec 2021 06:24:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: haoxintu at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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: Wed, 01 Dec 2021 06:24:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103513 Bug ID: 103513 Summary: [12 Regression] ICE in evaluate_conditions_for_known_args, at ipa-fnsummary.c:516 with -O2 and above Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Hi all. It seems to be a recent regression issue. $cat small.c #include uint16_t(a)(); uint16_t(b)(int f, int g) { return f * g; } uint64_t c(); void d() { c(a()); } uint64_t c(int e) { for (;;) if (b(20, -1L =3D=3D e)) for (;;) ; return 0; } $gcc -c -O2 small.c during IPA pass: inline small.c:12:1: internal compiler error: in evaluate_conditions_for_known_arg= s, at ipa-fnsummary.c:516 12 | } | ^ 0x6c881e evaluate_conditions_for_known_args ../../gcc/ipa-fnsummary.c:516 0xa6133f do_estimate_edge_size(cgraph_edge*) ../../gcc/ipa-inline-analysis.c:330 0xa6247a estimate_edge_size ../../gcc/ipa-inline.h:79 0xa6247a estimate_edge_growth ../../gcc/ipa-inline.h:100 0xa6247a do_estimate_growth_1 ../../gcc/ipa-inline-analysis.c:429 0xa625fd cgraph_node::call_for_symbol_and_aliases(bool (*)(cgraph_node*, void*), void*, bool) ../../gcc/cgraph.h:3411 0xa625fd estimate_growth(cgraph_node*) ../../gcc/ipa-inline-analysis.c:467 0x18d8d6c inline_small_functions ../../gcc/ipa-inline.c:1980 0x18d8d6c ipa_inline ../../gcc/ipa-inline.c:2743 0x18d8d6c execute ../../gcc/ipa-inline.c:3142 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/home/haoxin/haoxin-data/compilers/gcc/build/libexec/= gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=3D/home/haoxin/haoxin-data/compilers/gcc/build --enable-bootstrap --enable-checking=3Drelease --enable-languages=3Dc,c++ --enable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20211130 (experimental) (GCC) Can also quickly check here: https://godbolt.org/z/W18G8jn7E Thanks, Haoxin=