[llvm-bugs] [Bug 32822] New: clang crashes with arrays of std::complex
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Apr 26 22:46:43 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32822
Bug ID: 32822
Summary: clang crashes with arrays of std::complex
Product: clang
Version: 4.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: release blocker
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: powerchord at web.de
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Created attachment 18370
--> http://bugs.llvm.org/attachment.cgi?id=18370&action=edit
Error message with Visual Studio 2017
#include <complex>
// clang crashes here with any array size > 1
std::complex<double> v[2];
// I suppose the reason is a constexpr constructor with the parameter type
being const &. Please see the following explanation and the attachment
struct A
{
constexpr A(const int & = 0) {}
};
struct B // = A without &
{
constexpr B(const int /*&*/ = 0) {}
};
struct C // = A without constexpr
{
/*constexpr*/ C(const int & = 0) {}
};
A a1[1]; // OK
A a2[2]; // clang crashes
B b[2]; // OK
C c[2]; // OK
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170427/7a2d957d/attachment.html>
More information about the llvm-bugs
mailing list