public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2023-10-23 18:45 mjires at suse dot cz
  2023-10-26 11:47 ` [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos aoliva at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mjires at suse dot cz @ 2023-10-23 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

            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 = (k) ? &&x : &&y;
  if (k)
    goto *label;

x:
  if (k)
    dont_remove ();
y:
  return;
}



$ gcc 20050510-1.c -fharden-control-flow-redundancy
--param=max-jump-thread-duplication-stmts=0 -Ofast
20050510-1.c: In function ‘bar’:
20050510-1.c:12:5: warning: implicit declaration of function ‘dont_remove’
[-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<edge_def*, 10ul>&, 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 <https://gcc.gnu.org/bugs/> for instructions.

$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/mjires/checks/master/bin/gcc
COLLECT_LTO_WRAPPER=/home/mjires/checks/master/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/checks/master
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231023 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-31 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 18:45 [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 mjires at suse dot cz
2023-10-26 11:47 ` [Bug tree-optimization/111943] ICE in gimple_split_edge, at tree-cfg.cc:3019 on 20050510-1.c with new -fharden-control-flow-redundancy with computed gotos aoliva at gcc dot gnu.org
2023-10-31 12:34 ` cvs-commit at gcc dot gnu.org
2023-10-31 12:36 ` aoliva at gcc dot gnu.org

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).