From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39DB0399A411; Fri, 4 Jun 2021 03:34:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39DB0399A411 From: "cnsun at uwaterloo dot ca" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 Date: Fri, 04 Jun 2021 03:34:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: tree-ssa X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cnsun at uwaterloo dot ca 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 bug_severity priority component assigned_to reporter 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: Fri, 04 Jun 2021 03:34:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100898 Bug ID: 100898 Summary: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-lin= ux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/configure --enable-languages=3Dc,c++,lto --enable-checking-yes --enable-multiarch --prefix=3D/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210603 (experimental) [master revision :fe23f36c0:9663c744e2d0942f14eafa725a1bd9f766f02a16] (GCC) $ cat mutant.c a; fn1() { for (; a;) return bar(__builtin_va_arg_pack()); } main() { fn1(); } $ gcc-trunk -O2 mutant.c mutant.c:1:1: warning: data definition has no type or storage class 1 | a; | ^ mutant.c:1:1: warning: type defaults to =E2=80=98int=E2=80=99 in declaratio= n of =E2=80=98a=E2=80=99 [-Wimplicit-int] mutant.c:2:1: warning: return type defaults to =E2=80=98int=E2=80=99 [-Wimp= licit-int] 2 | fn1() { | ^~~ mutant.c: In function =E2=80=98fn1=E2=80=99: mutant.c:4:12: warning: implicit declaration of function =E2=80=98bar=E2=80= =99 [-Wimplicit-function-declaration] 4 | return bar(__builtin_va_arg_pack()); | ^~~ mutant.c: At top level: mutant.c:6:1: warning: return type defaults to =E2=80=98int=E2=80=99 [-Wimp= licit-int] 6 | main() { fn1(); } | ^~~~ during IPA pass: inline In function =E2=80=98fn1=E2=80=99: cc1: internal compiler error: in gimple_call_arg_ptr, at gimple.h:3264 0x758b10 gimple_call_arg_ptr /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/gimple.h:3264 0x758b10 gimple_call_arg_ptr /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/gimple.h:3262 0x758b10 copy_bb /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:2085 0xf93522 copy_cfg_body /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:3022 0xf93522 copy_body /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:3278 0xf96a56 expand_call_inline /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:5105 0xf98109 gimple_expand_calls_inline /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:5300 0xf98109 optimize_inline_calls(tree_node*) /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/tree-inline.c:5473 0xcbf76b inline_transform(cgraph_node*) /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/ipa-inline-transform.c:790 0xe19e04 execute_one_ipa_transform_pass /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/passes.c:2290 0xe19e04 execute_all_ipa_transforms(bool) /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/passes.c:2337 0xa874a9 cgraph_node::expand() /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:1821 0xa888cf expand_all_functions /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:1992 0xa888cf symbol_table::compile() /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:2356 0xa8b7cb symbol_table::compile() /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:2269 0xa8b7cb symbol_table::finalize_compilation_unit() /tmp/tmp.6GNjkccaVE-gcc-builder/gcc/gcc/cgraphunit.c:2537 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=