Open llvmbot opened 5 years ago
I confirmed the test case crashes upstream clang. Upstream LLVM doesn't support Metal, normally you would report such bugs to Apple, but since it affects clang, we can take a look.
clang(C++) crash while compiling the C++ code
struct foo
{
float& a;
float& b;
float bar()
{
return b;
}
};
int main(int argc, const char * argv[]) {
float x = 0, y = 0;
auto s = foo
{
.b = x,
.a = y,
}.bar();
float t = s;
return 0;
}
clang(C++) crash while compiling the C++ code
struct foo
{
float& a;
float& b;
float bar()
{
return b;
}
};
int main(int argc, const char * argv[]) {
float x = 0, y = 0;
auto s = foo
{
.b = x,
.a = y,
}.bar();
float t = s;
return 0;
}
I confirmed the test case crashes upstream clang. Upstream LLVM doesn't support Metal, normally you would report such bugs to Apple, but since it affects clang, we can take a look.
struct foo
{
float& a;
float& b;
float bar()
{
return b;
}
};
int main(int argc, const char * argv[]) {
float x = 0, y = 0;
auto s = foo
{
.b = x,
.a = y,
}.bar();
float t = s;
return 0;
}
Extended Description
Compile the Code and metal compiler crash