https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112411
Kewen Lin <linkw at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-11-07 CC| |linkw at gcc dot gnu.org, | |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> --- Confirmed, can be reproduced with native powerpc64 compiler. It fails at the code: 352│ if (insn_lengths_max_uid > INSN_UID (insn)) 353├───> return insn_lengths[INSN_UID (insn)]; p INSN_UID (insn) $1 = (int &) @0x7ffff5830384: -2147483641 p insn_lengths_max_uid $2 = 0 p insn_lengths $3 = (int *) 0x0 The given --param=min-nondebug-insn-uid=2147483647 causes the assigned insn uid becomes negative. At that time, insn_lengths isn't ready yet, it can workaround with further checking insn_lengths first. I noticed that those uid variables are of signed type, such as: x_cur_insn_uid @ emit_status x_cur_debug_insn_uid @ emit_status insn_uid @ rtx_def shouldn't they be with unsigned type instead? or is it by design?