[LLVMbugs] [Bug 16894] New: Clang crashes on certain (brace-)conversion from char to int in functions of classtemplates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 14 18:16:50 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: florian.weber at sfz-bw.de
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130815/5d7ec6e2/attachment.html>
More information about the llvm-bugs
mailing list