https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81299
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2017-10-10 Summary|Spurious "set but not used" |[8 Regression] Spurious |warning with constexpr |"set but not used" warning |variable |with constexpr variable Ever confirmed|0 |1 --- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> --- Confirmed in gcc-7-branch. In trunk the testcase currently crashes the compiler with "trying to capture ‘fun’ in instantiation of generic lambda". I think the ICE is a Dup, however.