From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B96B5385841B; Mon, 23 Oct 2023 18:45:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B96B5385841B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698086745; bh=EgY1TYhMGIMfqpPYdWLg0cwZ9t5QajnZMp+gNu7JMis=; h=From:To:Subject:Date:From; b=WVx969AZvD6arh7ctjesYyg9tdHPZB4SeH949sPkAkDWOAqBBaTlbjQsiAFlojppY muMNtimR5xOGSavO6PwFM7r3F/NUQGpzvvvbbFifAYoBPLSs1P2iUpknZHWRsqsW58 iJfQxsQYqHJhAgb2gtGIgckNppfyKybOKkwwaTwQ= From: "mjires at suse dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111943] New: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy Date: Mon, 23 Oct 2023 18:45:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mjires at suse dot cz 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111943 Bug ID: 111943 Summary: ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mjires at suse dot cz CC: aoliva at gcc dot gnu.org Target Milestone: --- Following testcase causes ICE with new -fharden-control-flow-redundancy $ cat 20050510-1.c /* { dg-require-effective-target indirect_jumps } */ /* { dg-require-effective-target label_values } */ void bar (int k) { void *label =3D (k) ? &&x : &&y; if (k) goto *label; x: if (k) dont_remove (); y: return; } $ gcc 20050510-1.c -fharden-control-flow-redundancy --param=3Dmax-jump-thread-duplication-stmts=3D0 -Ofast 20050510-1.c: In function =E2=80=98bar=E2=80=99: 20050510-1.c:12:5: warning: implicit declaration of function =E2=80=98dont_= remove=E2=80=99 [-Wimplicit-function-declaration] 12 | dont_remove (); | ^~~~~~~~~~~ during GIMPLE pass: hardcfr 20050510-1.c:4:6: internal compiler error: in gimple_split_edge, at tree-cfg.cc:3019 4 | void bar (int k) | ^~~ 0x7f2c1b gimple_split_edge /home/mjires/git/GCC/master/gcc/tree-cfg.cc:3019 0xad6acb split_edge(edge_def*) /home/mjires/git/GCC/master/gcc/cfghooks.cc:670 0xc83916 gimple_find_edge_insert_loc /home/mjires/git/GCC/master/gcc/gimple-iterator.cc:829 0xc8457b gsi_insert_seq_on_edge_immediate(edge_def*, gimple*) /home/mjires/git/GCC/master/gcc/gimple-iterator.cc:873 0x1d5468e rt_bb_visited::insert_exit_check_on_edge(gimple*, edge_def*) /home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:706 0x1d5468e rt_bb_visited::check(auto_vec&, int, auto_sbitmap const&) /home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:807 0x1d530b6 execute /home/mjires/git/GCC/master/gcc/gimple-harden-control-flow.cc:1476 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ gcc -v Using built-in specs. COLLECT_GCC=3D/home/mjires/checks/master/bin/gcc COLLECT_LTO_WRAPPER=3D/home/mjires/checks/master/libexec/gcc/x86_64-pc-linu= x-gnu/14.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/mjires/git/GCC/master/configure --prefix=3D/home/mjires/checks/master Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231023 (experimental) (GCC)=