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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE when using function     |ICE with static variable in
                   |local static constexpr      |template function used as
                   |variable at runtime         |template argument

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Shortest testcase:
template <int* format>
struct g { g() { *format =1; } };

template <int>
void impl() {
    static int i=1;
    static g<&i> h{};
}

int main() {
  impl<0>();
  return 0;
}

Reply via email to