https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93537
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2020-02-01 00:00:00 |2024-6-12 Priority|P3 |P2 Known to work| |13.1.0, 8.4.0 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Re-confirmed on the 12 branch. (gdb) up #3 0x0000000000c5650e in pp_c_enumeration_constant (pp=0x3eef950, e=<integer_cst 0x7ffff6a2b450>) at /space/rguenther/src/gcc-12-branch/gcc/c-family/c-pretty-print.cc:1068 1068 if (tree_int_cst_equal (DECL_INITIAL (TREE_VALUE (value)), e)) (gdb) l 1063 1064 /* Find the name of this constant. */ 1065 if ((pp->flags & pp_c_flag_gnu_v3) == 0) 1066 for (value = TYPE_VALUES (type); value != NULL_TREE; 1067 value = TREE_CHAIN (value)) 1068 if (tree_int_cst_equal (DECL_INITIAL (TREE_VALUE (value)), e)) 1069 break; 1070 1071 if (value != NULL_TREE) 1072 pp->id_expression (TREE_PURPOSE (value)); (gdb) p debug_tree (value) <tree_list 0x7ffff6b44cd0 purpose <identifier_node 0x7ffff6b5f500 TS_HANDLE_EXTENSION symbol <const_decl 0x7ffff6b71000 TS_HANDLE_EXTENSION type <enumeral_type 0x7ffff6b70540 TSGenType_E> VOID /tmp/t.c:2:28 align:1 warn_if_not_align:0 initial <integer_cst 0x7ffff6b59468 99>>> value <integer_cst 0x7ffff6b59468 type <integer_type 0x7ffff6a275e8 int> constant 99>> I'd say we likely get the enumeral type wrong, we assume a CONST_DECL but have <enumeral_type 0x7ffff6b707e0 TSGenTypeE asm_written unsigned SI size <integer_cst 0x7ffff6a0bf90 type <integer_type 0x7ffff6a270a8 bitsizetype> constant 32> unit-size <integer_cst 0x7ffff6a0bfa8 type <integer_type 0x7ffff6a27000 sizetype> constant 4> align:32 warn_if_not_align:0 symtab:-155847024 alias-set -1 canonical-type 0x7ffff6b70540 precision:32 min <integer_cst 0x7ffff6a0bfc0 0> max <integer_cst 0x7ffff6a0bf78 4294967295> values <tree_list 0x7ffff6b44cd0 purpose <identifier_node 0x7ffff6b5f500 TS_HANDLE_EXTENSION symbol <const_decl 0x7ffff6b71000 TS_HANDLE_EXTENSION>> value <integer_cst 0x7ffff6b59468 constant 99>> chain <type_decl 0x7ffff6a36688 D.1981>>