https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120564
Bug ID: 120564
Summary: ICE: verify_gimple failed during IPA pass:
*free_lang_data
Product: gcc
Version: 16.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: ---
Target: x86_64
*******************************************************************************
The compiler produces an internal error during IPA pass: *free_lang_data when
compiling the provided code with the specified options.
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-250601/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gdbtest/gcc/gcc-250601
--enable-languages=c,c++ --disable-multilib --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20250601 (experimental) (GCC)
*******************************************************************************
Program:
#cat code.c
extern int b[];
void foo ()
{
unsigned long v1, v2, v3;
#pragma omp parallel for schedule(static, 32) collapse(3)
for (v1 = 0; v1 < 20; v1 += 2)
for (v2 = 9223372036854775807LL; v2 > 9223372036854775807LL; v2 -= 3)
for (v3 = 10; v3 > 0; v3--)
b[64]++;
}
*******************************************************************************
Command Lines:
gcc code.c -pipe -MMD -MP -MQ ./ -MT test.o -MF test.d -c -o code_0.o
<source>: In function 'foo._omp_fn.0':
<source>:10:2: error: invalid operands in gimple comparison
10 | }
| ^
if ((signed long) v2 < 0)
during IPA pass: *free_lang_data
<source>:10:2: internal compiler error: verify_gimple failed
0x2505575 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
???:0
0x2526e26 internal_error(char const*, ...)
???:0
0x11b2e4e verify_gimple_in_cfg(function*, bool, bool)
???:0
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.
Compiler returned: 1
*******************************************************************************
Also ICE on trunk, compiler explorer:https://gcc.godbolt.org/z/Mvs53WKqh
*******************************************************************************