https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117380
Bug ID: 117380
Summary: ICE: tree check: expected class 'type', have
'exceptional' (error_mark) in get_unwidened, at
tree.cc:8019
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: ---
*******************************************************************************
OS and Platform:
$ uname -a:
Linux 65dac7c84719 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=/home/software/gcc-trunk-3aa004f/bin/gcc
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk-3aa004f/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/software/gcc-trunk-3aa004f
--enable-coverage
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240630 (experimental) (GCC)
*******************************************************************************
Program:
$ cat mutant.c
int a, b;
void c()
{
a >> b + 503359447364223024;
}
__attribute__((vector_size(4))) b;
*******************************************************************************
Command Lines:
$ gcc mutant.c
during GIMPLE pass: strlen
mutant.c:6:33: error: type defaults to 'int' in declaration of 'b'
[-Wimplicit-int]
6 | __attribute__((vector_size(4))) b;
| ^
mutant.c:6:33: error: conflicting types for 'b'; have '__vector(1) int'
mutant.c:1:8: note: previous declaration of 'b' with type 'int'
1 | int a, b;
| ^
mutant.c: In function 'c':
mutant.c:4:7: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in get_unwidened, at tree.cc:8019
4 | a >> b + 503359447364223024;
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~
0x5071bcf diagnostic_context::report_diagnostic(diagnostic_info*)
???:0
0x50724a1 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1],
diagnostic_t)
???:0
0x50924c7 internal_error(char const*, ...)
???:0
0x26856d2 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
???:0
0xd4a676 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
???:0
0x267dac4 get_unwidened(tree_node*, tree_node*)
???:0
0x126cd01 convert_to_integer(tree_node*, tree_node*)
???:0
0xe4febf convert(tree_node*, tree_node*)
???:0
0xfd948f c_gimplify_expr(tree_node**, gimple**, gimple**)
???:0
0x1727e44 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0x16d5172 gimplify_stmt(tree_node**, gimple**)
???:0
0x1729b35 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0x16d5172 gimplify_stmt(tree_node**, gimple**)
???:0
0x17307ed gimplify_body(tree_node*, bool)
???:0
0x17319cc gimplify_function_tree(tree_node*)
???:0
0x124b024 cgraph_node::analyze()
???:0
0x125521b symbol_table::finalize_compilation_unit()
???: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.
Godbolt link: https://godbolt.org/z/snK9a7PPa