This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/70353] static_assert + assert + c++14 crashes GCC


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

--- Comment #3 from Andriy Lysnevych <mrlika at gmail dot com> ---
static_assert is not required. This code also crashes:

#include <cassert>

constexpr int ce(int r) {
  assert(r == 3);
  return r;
}

const auto c = ce(3);

Problem is in assert called from constexpr function.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]