https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101195
Bug ID: 101195 Summary: ICE: in tree_to_uhwi, at tree.c:6324 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210624 (experimental) [master revision :e518ee6cd:fcf617f0d2a5a1b624718e07d7b219cb0234436f] (GCC) $ cat mutant.c test_eh_return_data_regno() { volatile res = __builtin_eh_return_data_regno(-42.); } $ gcc-trunk mutant.c mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | test_eh_return_data_regno() { | ^~~~~~~~~~~~~~~~~~~~~~~~~ mutant.c: In function ‘test_eh_return_data_regno’: mutant.c:2:12: warning: type defaults to ‘int’ in declaration of ‘res’ [-Wimplicit-int] 2 | volatile res = __builtin_eh_return_data_regno(-42.); | ^~~ during RTL pass: expand mutant.c:2:18: internal compiler error: in tree_to_uhwi, at tree.c:6324 2 | volatile res = __builtin_eh_return_data_regno(-42.); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x7c7c7e tree_to_uhwi(tree_node const*) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/tree.c:6324 0x7c7c7e tree_to_uhwi(tree_node const*) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/tree.c:6322 0xb50537 expand_builtin_eh_return_data_regno(tree_node*) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/except.c:2170 0xa222f6 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/builtins.c:10409 0xb7366c expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/expr.c:11439 0xb7e018 store_expr(tree_node*, rtx_def*, int, bool, bool) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/expr.c:5994 0xb7f65f expand_assignment(tree_node*, tree_node*, bool) /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/expr.c:5729 0xa4cb8b expand_call_stmt /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/cfgexpand.c:2844 0xa4cb8b expand_gimple_stmt_1 /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/cfgexpand.c:3877 0xa4cb8b expand_gimple_stmt /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/cfgexpand.c:4041 0xa528c9 expand_gimple_basic_block /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/cfgexpand.c:6083 0xa5479f execute /tmp/tmp.gHvB6MNy5h-gcc-builder/gcc/gcc/cfgexpand.c:6809 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.