https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118415
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Minimal patch could be --- gcc/expr.cc.jj 2025-01-08 10:05:24.498994763 +0100 +++ gcc/expr.cc 2025-01-11 13:31:34.608998939 +0100 @@ -14304,12 +14304,17 @@ generate_crc_table (unsigned HOST_WIDE_I { gcc_assert (crc_bits <= 64); - /* Buf size - 24 letters + 6 '_' + /* Buf size - 26 letters + 6 '_' + 20 numbers (2 for crc bit size + 2 for 0x + 16 for 64-bit polynomial) + 1 for \0. */ - char buf[51]; - sprintf (buf, "crc_table_for_crc_%u_polynomial_" HOST_WIDE_INT_PRINT_HEX, + char buf[sizeof ("__crc_table_for_crc__polynomial_") + 20]; + sprintf (buf, "__crc_table_for_crc_%u_polynomial_" HOST_WIDE_INT_PRINT_HEX, crc_bits, polynom); +#if !defined (NO_DOT_IN_LABEL) + buf[sizeof ("__crc_table") - 1] = '.'; +#elif !defined (NO_DOLLAR_IN_LABEL) + buf[sizeof ("__crc_table") - 1] = '$'; +#endif tree id = maybe_get_identifier (buf); if (id) though that is solely about the name. I'm really surprised by if (TREE_PUBLIC (id)) { TREE_PUBLIC (decl) = 1; make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl)); } since when IDENTIFIER_NODE should have TREE_PUBLIC set on it and what would do that?