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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-07-24
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |7.2
            Summary|[7 Regression] Invalid      |[7/8 Regression] Invalid
                   |codegen with constexpr      |codegen with constexpr
                   |variable template           |variable template
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r239267.
Simplified testcase:
template <int i> struct A { constexpr operator int () const { return i; } };
template <int i> constexpr A<i> a{};
template <typename F> void foo (F f) { f (A<0>{}); }
template <typename T>
void bar (T) { constexpr auto N = a<1>; auto f = [&] (auto i) { static_assert
(static_cast<int>(N) == 1, ""); }; foo (f); }
int main () { bar (0); }

Reply via email to