[Bug c++/81299] [8 Regression] Spurious "set but not used" warning with constexpr variable

2017-10-11 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81299

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Wed Oct 11 08:50:15 2017
New Revision: 253630

URL: https://gcc.gnu.org/viewcvs?rev=253630=gcc=rev
Log:
2017-10-11  Paolo Carlini  

PR c++/81299
* g++.dg/cpp1y/lambda-generic-ice7.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-ice7.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/81299] [8 Regression] Spurious "set but not used" warning with constexpr variable

2017-10-10 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81299

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #3 from Markus Trippelsdorf  ---
Fixed by r253601.

[Bug c++/81299] [8 Regression] Spurious "set but not used" warning with constexpr variable

2017-10-10 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81299

Paolo Carlini  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  ---
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.