https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84704

--- Comment #1 from Vegard Nossum <vegard.nossum at gmail dot com> ---
I should add that both -g and (one of) -Os/-O1/-O2/-O3 seems necessary for the
ICE to trigger. Also, it seems that 7.3.0 works by emitting this for -O1:

b():
  mov eax, DWORD PTR a[rip]
  mov ecx, 0
  cdq
  idiv ecx
  mov DWORD PTR a[rip], edx
  ret
a:
  .zero 4

and this for -O2:

b():
  ud2
a:
  .zero 4

Reply via email to