public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115573] New: ICE: verify_flow_info failed with no_reorder attribute
@ 2024-06-21  3:23 iamanonymous.cs at gmail dot com
  2024-06-21  3:33 ` [Bug rtl-optimization/115573] " pinskia at gcc dot gnu.org
  2024-06-21  7:48 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-06-21  3:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115573
           Summary: ICE: verify_flow_info failed with no_reorder attribute
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

ICE on trunk.
Compiler Explorer: https://godbolt.org/z/8sbP3Ydh6

*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/root/gcc_set/trunk-48a320a/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/trunk-48a320a/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/trunk-48a320a
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak --enable-coverage
--disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240426 (experimental) (GCC) 

*******************************************************************************
Program:
$ cat mutant.c
int a;
__attribute__((no_reorder)) int b() {
  __label__ d, e;
  void f(int c) { goto *c ? &&d : &&e; }
d:
  f(a);
e:
}

*******************************************************************************
Command Lines:
$ gcc -O2 mutant.c
mutant.c: In function ‘f’:
mutant.c:4:40: error: basic block 2 edge lists are corrupted
    4 |   void f(int c) { goto *c ? &&d : &&e; }
      |                                        ^
during RTL pass: cprop
mutant.c:4:40: internal compiler error: verify_flow_info failed
0x117ca2f verify_flow_info()
        ../../gcc/gcc/cfghooks.cc:287
0x116b814 checking_verify_flow_info()
        ../../gcc/gcc/cfghooks.h:214
0x11a913e commit_edge_insertions()
        ../../gcc/gcc/cfgrtl.cc:2155
0x45abf2f bypass_conditional_jumps
        ../../gcc/gcc/cprop.cc:1744
0x45ac80c one_cprop_pass
        ../../gcc/gcc/cprop.cc:1895
0x45acadd execute_rtl_cprop
        ../../gcc/gcc/cprop.cc:1940
0x45accf0 execute
        ../../gcc/gcc/cprop.cc:1980
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.

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

* [Bug rtl-optimization/115573] ICE: verify_flow_info failed with no_reorder attribute
  2024-06-21  3:23 [Bug c/115573] New: ICE: verify_flow_info failed with no_reorder attribute iamanonymous.cs at gmail dot com
@ 2024-06-21  3:33 ` pinskia at gcc dot gnu.org
  2024-06-21  7:48 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-21  3:33 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |rtl-optimization

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect this is invalid code; it is definitely undefined.

cprop is trying to turn the computed goto into a regular goto but it is a
non-local goto which it is not valid thing for a computed goto ...

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

* [Bug rtl-optimization/115573] ICE: verify_flow_info failed with no_reorder attribute
  2024-06-21  3:23 [Bug c/115573] New: ICE: verify_flow_info failed with no_reorder attribute iamanonymous.cs at gmail dot com
  2024-06-21  3:33 ` [Bug rtl-optimization/115573] " pinskia at gcc dot gnu.org
@ 2024-06-21  7:48 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-21  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
But of course hard to diagnose.  We shouldn't ICE though just leave it as
undefined behavior.

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

end of thread, other threads:[~2024-06-21  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-21  3:23 [Bug c/115573] New: ICE: verify_flow_info failed with no_reorder attribute iamanonymous.cs at gmail dot com
2024-06-21  3:33 ` [Bug rtl-optimization/115573] " pinskia at gcc dot gnu.org
2024-06-21  7:48 ` rguenth 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).