https://bugs.llvm.org/show_bug.cgi?id=40246
Bug ID: 40246
Summary: clang++ segfault in EmitReturnBlock
Product: clang
Version: 7.0
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Created attachment 21301
--> https://bugs.llvm.org/attachment.cgi?id=21301&action=edit
code
``` cpp
#include <cstdio>
template<int* p>
void bar() {
printf("p = %p, *p = %d\n", p, *p);
}
template<class T>
void foo(T) {
static int x = 456;
bar<&x>();
}
int main() {
foo(123);
return 0;
}
```
`clang++ -std=c++17 segfault.cpp` crashed.
https://godbolt.org/z/Aebp_E
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs