https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347
Bug ID: 112347 Summary: [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment() Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed ICE on today's `gcc-master` r14-5073-g36a26298ec7dfc when building jemalloc-5.3.0. Extracted the following example: // $ cat a.c.c int * mallocx(unsigned long) __attribute__((malloc)) __attribute__((alloc_size(1))); void test_oom(void) { void *a_ = mallocx(1); } Crashing: $ gcc/xgcc -Bgcc -std=gnu11 -Wextra -c /tmp/a.c.c /tmp/a.c.c: In function ‘test_oom’: /tmp/a.c.c:2:1: internal compiler error: Segmentation fault 2 | void test_oom(void) { void *a_ = mallocx(1); } | ^~~~ 0x225a30b diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x225b12e internal_error(char const*, ...) ???:0 0xee1c4f crash_signal(int) ???:0 0x7bfff6 convert_for_assignment(unsigned int, unsigned int, tree_node*, tree_node*, tree_node*, impl_conv, bool, tree_node*, tree_node*, int, int) ???:0 0x7cc38d digest_init(unsigned int, tree_node*, tree_node*, tree_node*, bool, bool, bool, bool, bool, bool) ???:0 0x7cf3af store_init_value(unsigned int, tree_node*, tree_node*, tree_node*) ???:0 0x795284 finish_decl(tree_node*, unsigned int, tree_node*, tree_node*, tree_node*) ???:0 0x817385 c_parser_declaration_or_fndef(c_parser*, bool, bool, bool, bool, bool, tree_node**, vec<c_token, va_heap, vl_ptr>*, bool, tree_node*, oacc_routine_data*, bool*) ???:0 0x814efb c_parser_compound_statement_nostart(c_parser*) ???:0 0x81573f c_parser_compound_statement(c_parser*, unsigned int*) ???:0 0x81719a c_parser_declaration_or_fndef(c_parser*, bool, bool, bool, bool, bool, tree_node**, vec<c_token, va_heap, vl_ptr>*, bool, tree_node*, oacc_routine_data*, bool*) ???:0 0x821ab9 c_parser_external_declaration(c_parser*) ???:0 0x822610 c_parse_file() ???:0 0x8a274f c_common_parse_file() ???:0 $ gcc/xgcc -Bgcc -v Reading specs from gcc/specs COLLECT_GCC=gcc/xgcc COLLECT_LTO_WRAPPER=gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib --disable-bootstrap --disable-lto --disable-libsanitizer --enable-languages=c CFLAGS='-O1 -g0' CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0' Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20231102 (experimental) (GCC)