http://llvm.org/bugs/show_bug.cgi?id=16894
Bug ID: 16894
Summary: Clang crashes on certain (brace-)conversion from char
to int in functions of classtemplates
Product: clang
Version: 3.3
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 11038
--> http://llvm.org/bugs/attachment.cgi?id=11038&action=edit
The complete commandline
Clang 3.3 on x86_64-unknown-linux-gnu crashes on the following code:
void gun(int){}
template<typename>
struct foo{
void fun () {
char i = 0;
gun(int{i});
}
};
int main () {
foo<void> bar;
bar.fun();
}
The relevant diagnostics are:
fatal error: error in backend: Cannot select: 0x272b3b0: i32 = bitcast
0x272adb0 [ORD=5] [ID=9]
0x272adb0: i8 = Constant<0> [ORD=3] [ID=4]
In function: _ZN3fooIvE3funEv
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
“un-templating” the classtemplate, doing the conversion outside a function-call
and doing the conversion from a temporary variable (“gun(int{char{0}})”) all
make the issue vanish.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs