https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64791
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> --- Hi ville. With r220303 I don't see the warning, at any optimization level and various combinations of other flags + -Wunused-but-set-variable of course. Can you please double check / provide more information?