This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70353] New: static_assert + assert + c++14 crashes GCC
- From: "mrlika at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Mar 2016 10:49:10 +0000
- Subject: [Bug c++/70353] New: static_assert + assert + c++14 crashes GCC
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70353
Bug ID: 70353
Summary: static_assert + assert + c++14 crashes GCC
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mrlika at gmail dot com
Target Milestone: ---
I use out-of-the-box GCC 5.2.1 in Ubuntu 15.10:
gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
This code makes GCC crash when I define standard --std=c++14 or --std=c++17:
#include <cassert>
constexpr int ce(int r) {
assert(r == 3);
return r;
}
static_assert(ce(3) == 3, "static asser error");
Command to reproduce:
$ gcc --std=c++14 bug.cpp
bug.cpp:8:17: in constexpr expansion of âce(3)â
bug.cpp:8:48: internal compiler error: Segmentation fault
static_assert(ce(3) == 3, "static asser error");
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.