[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-bugs
Subject: [LLVMbugs] [Bug 19007] New: Destructor alias emission ignores calling convention
From: bugzilla-daemon () llvm ! org
Date: 2014-02-28 15:32:30
Message-ID: bug-19007-206 () http ! llvm ! org/bugs/
[Download RAW message or body]
--1393601551.B2aF3772.8223
Date: Fri, 28 Feb 2014 09:32:31 -0600
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
http://llvm.org/bugs/show_bug.cgi?id=19007
Bug ID: 19007
Summary: Destructor alias emission ignores calling convention
Product: clang
Version: trunk
Hardware: PC
URL: http://www.freebsd.org/cgi/query-pr.cgi?pr=187103
OS: All
Status: NEW
Keywords: miscompilation
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs@nondot.org
Reporter: benny.kra@gmail.com
CC: llvmbugs@cs.uiuc.edu, rafael.espindola@gmail.com
Classification: Unclassified
Here's a mildly insane test case reduced from mozilla.
$ cat t.cc
#define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall))
struct nsCOMPtr_base {
NS_CONSTRUCTOR_FASTCALL ~nsCOMPtr_base() {}
};
struct nsCOMPtr : private nsCOMPtr_base {};
int main() {
nsCOMPtr ptr;
}
$ clang -target i386-linux-gnu -O1 -Xclang -disable-llvm-optzns -flto -S -o -
t.cc
define i32 @main() #0 {
entry:
%ptr = alloca %struct.nsCOMPtr, align 1
call void bitcast (void (%struct.nsCOMPtr_base*)* @_ZN13nsCOMPtr_baseD2Ev to
void (%struct.nsCOMPtr*)*)(%struct.nsCOMPtr* %ptr)
ret i32 0
}
define linkonce_odr x86_stdcallcc void
@_ZN13nsCOMPtr_baseD2Ev(%struct.nsCOMPtr_base* inreg %this)
Here we create a call to @_ZN13nsCOMPtr_baseD2Ev without adding the
x86_stdcallcc attribute to the call. The optimizer will turn this into a call
to @llvm.trap.
--
You are receiving this mail because:
You are on the CC list for the bug.
--1393601551.B2aF3772.8223
Date: Fri, 28 Feb 2014 09:32:31 -0600
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Destructor alias emission ignores calling convention"
href="http://llvm.org/bugs/show_bug.cgi?id=19007">19007</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Destructor alias emission ignores calling convention
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>URL</th>
<td>http://www.freebsd.org/cgi/query-pr.cgi?pr=187103
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Keywords</th>
<td>miscompilation
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>benny.kra@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu, rafael.espindola@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Here's a mildly insane test case reduced from mozilla.
$ cat t.cc
#define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall))
struct nsCOMPtr_base {
NS_CONSTRUCTOR_FASTCALL ~nsCOMPtr_base() {}
};
struct nsCOMPtr : private nsCOMPtr_base {};
int main() {
nsCOMPtr ptr;
}
$ clang -target i386-linux-gnu -O1 -Xclang -disable-llvm-optzns -flto -S -o -
t.cc
define i32 @main() #0 {
entry:
%ptr = alloca %struct.nsCOMPtr, align 1
call void bitcast (void (%struct.nsCOMPtr_base*)* @_ZN13nsCOMPtr_baseD2Ev to
void (%struct.nsCOMPtr*)*)(%struct.nsCOMPtr* %ptr)
ret i32 0
}
define linkonce_odr x86_stdcallcc void
@_ZN13nsCOMPtr_baseD2Ev(%struct.nsCOMPtr_base* inreg %this)
Here we create a call to @_ZN13nsCOMPtr_baseD2Ev without adding the
x86_stdcallcc attribute to the call. The optimizer will turn this into a call
to @llvm.trap.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>
--1393601551.B2aF3772.8223--
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic