https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118511
Bug ID: 118511 Summary: [15 Regression] ICE when compiling s390-tools since r15-2002 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- s390-tools stage3.c has static inline void __attribute__((noreturn)) start_kernel(void) { struct psw_t *psw = &(*((struct _lowcore *) 0)).program_new_psw; unsigned long addr, code; psw->mask = 0x000000180000000ULL; code = 1; asm volatile( " larl %[addr],.no_diag308\n" " stg %[addr],8(%[psw])\n" " diag %[code],%[code],0x308\n" ".no_diag308:\n" " sam31\n" " sr %r1,%r1\n" " sr %r2,%r2\n" " sigp %r1,%r2,%[order]\n" " lpsw 0\n" : [addr] "=&d" (addr), [code] "+&d" (code) : [psw] "a" (psw), [order] "L" (18)); while (1); } It is unclear what they intended, it assembled before r15-2002 with %r1 the same as %[code] (or %1, same thing) and %r2 the same as %[psw] (or %2, same thing), the r modifier was just ignored. They could have meant %%r1 and %%r2 too, who knows. With --enable-checking=release gcc 15 it just emits something which doesn't assemble. In any case, print_operand hooks shouldn't be using assertions, they should be using output_operand_lossage.