https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61904
--- Comment #11 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Here's a small (auto-)reduced testcase for this specific issue: markus@x4 ~ % cat fair.i int a, b, d; enum cpu_idle_type { CPU_MAX_IDLE_TYPES }; struct sched_domain { int balance_interval; int lb_count[0]; int lb_nobusyg[]; } c,*g ; __typeof__(int[0]) f; int *h; static struct sched_domain *fn1 (int *p1, int *p2) { struct sched_domain *e; int i; for (; i = fn2 (i);) { e = &*( { __asm__("" : "=r"(d) : "0"(0)); (typeof(&c))0 + a; }); fn3 (); fn4 (i); } return e; } fn5 (int p1, struct sched_domain *p2, enum cpu_idle_type p3) { int *j = *( { long k; asm volatile("" : "=r"(k) : ""(b), "0"(&f)); (typeof(*&f) *)k; }); if (p3) h = 0; int l = *j; p2->lb_count[p3]++; redo: p2->lb_nobusyg[p3]++; g = fn1 (0, 0); if (fn6 (j)) goto redo; p2->balance_interval *= 2; } markus@x4 ~ % gcc -c -mcmodel=kernel -Os -fno-omit-frame-pointer -fcompare-debug fair.i gcc: error: fair.i: -fcompare-debug failure (length) markus@x4 ~ % gcc -c -mcmodel=kernel -O2 -fno-omit-frame-pointer -fcompare-debug fair.i markus@x4 ~ %