Confirmed.
Possibly related bug: PR60500
(In reply to Mario Baumann from comment #0)
> - -O0 works fine
This is expected, uninitializedness may only become apparent to the compiler after some optimization passes have simplified/reorganized the code.

ESRA creates
w$offset_132 = PHI <w$offset_95(D)(2), w$offset_103(21)>
before we read n. LIM later pulls some computations using w$offset_132 before the test on w.data, but that's not really relevant. I don't think there is anything the front-end can do about that, it seems to be purely middle-end, SRA creating exactly what uninit likes to warn about.