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

            Bug ID: 115455
           Summary: ICE: verify_flow_info failed during GIMPLE pass: cfg
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---
            Target: x86_64

*******************************************************************************
The compiler produces an internal error during the cfg GIMPLE pass when
compiling the provided code. 
The issue can also be reproduced on Compiler Explorer.
*******************************************************************************
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 -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /root/gdbtest/gcc/obj/../gcc/configure
--prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240509 (experimental) (GCC) 
*******************************************************************************
Program:
# cat bugfunc.c

void f(void)
{
  void p(void)
  {
  __label__ l1;
  void q(void)
  {
    goto l1;
  }

  l1:;
  }
  p();
}
int
main (void)
{
  f();
  return 0;
}   


*******************************************************************************
Command Lines:
# gcc bugfunc.c -std=c11 -fvisibility=hidden -fsanitize=address -fno-
omit-frame-pointer -fno-common -fstrict-aliasing -fstack-protector-strong
-fno-exceptions -fno-rtti -fpic -ffunction-sections -fdata-sections -Werror 
-Wall -Wextra  -Wno-unused-parameter -Wno-c++98-compat
-Wno-c++98-compat-pedantic -Wno-missing-noreturn -Wno-missing-prototypes
-Wno-missing-field-initializers -Wno-cast-align -Wno-nested-anon-types
-Wno-vla-extension -Wno-vla-extension -o bugfunc
cc1: error: command-line option ‘-fno-rtti’ is valid for C++/D/ObjC++ but not
for C [-Werror]
bugfunc.c: In function ‘p’:
bugfunc.c:3:8: error: label ‘({anonymous})’ has incorrect context in bb 4
    3 |   void p(void)
      |        ^
during GIMPLE pass: cfg
bugfunc.c:3:8: internal compiler error: verify_flow_info failed
0xb633de verify_flow_info()
        /root/gdbtest/gcc/obj/../gcc/gcc/cfghooks.cc:287
0x10fa16c checking_verify_flow_info()
        /root/gdbtest/gcc/obj/../gcc/gcc/cfghooks.h:214
0x10fa16c cleanup_tree_cfg_noloop
        /root/gdbtest/gcc/obj/../gcc/gcc/tree-cfgcleanup.cc:1154
0x10fa16c cleanup_tree_cfg(unsigned int)
        /root/gdbtest/gcc/obj/../gcc/gcc/tree-cfgcleanup.cc:1205
0x10f1ba4 execute_build_cfg
        /root/gdbtest/gcc/obj/../gcc/gcc/tree-cfg.cc:379
0x10f1ba4 execute
        /root/gdbtest/gcc/obj/../gcc/gcc/tree-cfg.cc:413
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.

*******************************************************************************
Also ICE on trunk, compiler explorer:https://godbolt.org/z/KsWE7h7zE
*******************************************************************************
  • [Bug tree-optimization/11545... iamanonymous.cs at gmail dot com via Gcc-bugs

Reply via email to