https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88729
Bug ID: 88729 Summary: ICE in libiberty during bootstrap with debug info Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: koenigni at gcc dot gnu.org Target Milestone: --- While trying to compile gcc with maximum debug info it ICE'd in libiberty/d-demangle.c in expand_gimple_statement(). The error happens only on power (powerpc64le-unknown-linux-gnu), on x86-64 it dies in a different way a bit later (Thomas will file the bug report for that). Below is the way the compiler was configured and the command that caused the ICE. $ CFLAGS="-Og -ggdb3" CXXFLAGS="-Og -ggdb3" ../trunk/configure --snip-- $ make --snip-- gcc -c -DHAVE_CONFIG_H -Og -ggdb3 -save-temps -I. -I../../../trunk/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../../trunk/libiberty/d-demangle.c -o noasan/d-demangle.o; \ else true; fi gcc -c -DHAVE_CONFIG_H -Og -ggdb3 -save-temps -I. -I../../../trunk/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../../trunk/libiberty/d-demangle.c -o d-demangle.o ../../../trunk/libiberty/d-demangle.c: In function ‘dlang_value’: ../../../trunk/libiberty/d-demangle.c:1278:14: warning: this statement may fall through [-Wimplicit-fallthrough=] 1278 | mangled++; | ~~~~~~~^~ ../../../trunk/libiberty/d-demangle.c:1284:5: note: here 1284 | case '0': case '1': case '2': case '3': case '4': | ^~~~ ../../../trunk/libiberty/d-demangle.c: In function ‘dlang_type’: ../../../trunk/libiberty/d-demangle.c:619:10: warning: this statement may fall through [-Wimplicit-fallthrough=] 619 | if (!dlang_call_convention_p (mangled)) | ^ ../../../trunk/libiberty/d-demangle.c:626:5: note: here 626 | case 'F': /* function T (D) */ | ^~~~ during RTL pass: expand ../../../trunk/libiberty/d-demangle.c: In function ‘dlang_identifier’: ../../../trunk/libiberty/d-demangle.c:850:8: internal compiler error: in set_value_range, at tree-vrp.c:289 850 | if (strncmp (mangled, "__ctor", len) == 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x10d620b3 set_value_range(value_range*, value_range_type, tree_node*, tree_node*, bitmap_head*) ../../trunk-caf/gcc/tree-vrp.c:289 0x10d6c2d3 extract_range_from_binary_expr_1(value_range*, tree_code, tree_node*, value_range*, value_range*) ../../trunk-caf/gcc/tree-vrp.c:1604 0x10d6e76b determine_value_range_1 ../../trunk-caf/gcc/tree-vrp.c:6865 0x10d6eb43 determine_value_range(tree_node*, generic_wide_int<wide_int_storage>*, generic_wide_int<wide_int_storage>*) ../../trunk-caf/gcc/tree-vrp.c:6900 0x10393243 get_size_range(tree_node*, tree_node**, bool) ../../trunk-caf/gcc/calls.c:1258 0x1039a00b maybe_warn_nonstring_arg(tree_node*, tree_node*) ../../trunk-caf/gcc/calls.c:1617 0x1039bafb initialize_argument_information ../../trunk-caf/gcc/calls.c:2197 0x1039cfdf expand_call(tree_node*, rtx_def*, int) ../../trunk-caf/gcc/calls.c:3577 0x10375c2f expand_builtin_strncmp ../../trunk-caf/gcc/builtins.c:4793 0x103861cb expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../trunk-caf/gcc/builtins.c:7445 0x1054ae3f expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../trunk-caf/gcc/expr.c:10943 0x10564f53 expand_expr ../../trunk-caf/gcc/expr.h:279 0x10564f53 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../trunk-caf/gcc/expr.c:8456 0x1054733b expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../trunk-caf/gcc/expr.c:11230 0x1055a9c7 expand_expr ../../trunk-caf/gcc/expr.h:279 0x1055a9c7 store_expr(tree_node*, rtx_def*, int, bool, bool) ../../trunk-caf/gcc/expr.c:5556 0x1055c653 expand_assignment(tree_node*, tree_node*, bool) ../../trunk-caf/gcc/expr.c:5420 0x103b6c6f expand_call_stmt ../../trunk-caf/gcc/cfgexpand.c:2685 0x103b6c6f expand_gimple_stmt_1 ../../trunk-caf/gcc/cfgexpand.c:3575 0x103b6c6f expand_gimple_stmt ../../trunk-caf/gcc/cfgexpand.c:3734 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. Makefile:703: recipe for target 'd-demangle.o' failed make[3]: *** [d-demangle.o] Error 1 make[3]: Leaving directory '/home/gcc/trunk-bin/build-powerpc64le-unknown-linux-gnu/libiberty' Makefile:2686: recipe for target 'all-build-libiberty' failed make[2]: *** [all-build-libiberty] Error 2 make[2]: Leaving directory '/home/gcc/trunk-bin' Makefile:27153: recipe for target 'stage1-bubble' failed make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory '/home/gcc/trunk-bin' Makefile:991: recipe for target 'all' failed make: *** [all] Error 2