https://bugs.llvm.org/show_bug.cgi?id=48591
Bug ID: 48591
Summary: [11 regression] Code segfaults with -O1 -mavx2
Product: new-bugs
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
I have some code which has started segfaulting (often, but not reliably) when
compiled with `clang-11 -O1 -mavx2`. clang-10 works reliably, as do other
optimization levels.
I (well, C-Reduce) have reduced it to the following:
typedef long a __attribute__((__vector_size__(32)));
a d, e;
void b(a *p1) { __builtin_memcpy(p1, &d, sizeof(d)); }
int main() {
{
{
int c[sizeof(e) / sizeof(int)];
b(({ (a *)c; }));
}
}
}
Here it is on Compiler Explorer: <https://godbolt.org/z/z8d6hK>. The exit code
for clang-11 is 139 for me now, but I can't promise it will be for you; as I
mentioned it doesn't crash every time, and I'm pretty sure Compiler Explorer
caches results. On my desktop it's crashing on ~52% of executions.
This happens with a *lot* of the test cases in SIMDe
(<https://github.com/simd-everywhere/simde>) if anyone wants to try reproducing
with "real" code.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs