<html>
<head>
<base href="https://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 --- - Invalid code generation (regression) in pass-by-value on PowerPC"
href="https://llvm.org/bugs/show_bug.cgi?id=23097">23097</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Invalid code generation (regression) in pass-by-value on PowerPC
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.6
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andyg1001@hotmail.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14132" name="attach_14132" title="Simplified test case">attachment 14132</a> <a href="attachment.cgi?id=14132&action=edit" title="Simplified test case">[details]</a></span>
Simplified test case
I've spotted a regression between clang 3.4.1 and 3.6.0 when compiling for
powerpc (compiling for x86 is ok). A simplified test case is attached. The
problem occurs on return from test() where the copies of A are destructed.
Compiling the test case with clang 3.4.1 produces this output:
1 [0xbf896c08::0x10012008] 1
2 [0xbf896c00::0x10012018] 1
1 [0xbf896bf0::0x10012008] 2
2 [0xbf896be8::0x10012018] 2
1 [0xbf896bf0::0x10012018] 3
2 [0xbf896be8::0x10012018] 3
1 [0xbf896c08::0x10012008] 1
2 [0xbf896c00::0x10012018] 1
Compiling with clang 3.6.0 produces this output:
1 [0xbf969b38::0x10012008] 1
2 [0xbf969b30::0x10012018] 1
1 [0xbf969b08::0x10012008] 2
2 [0xbf969b0c::0x10012018] 2
1 [0xbf969b08::0x10012018] 3
2 [0xbf969b0c::0x10012018] 3
1 [0xbf969b38::0x10012008] 0
2 [0xbf969b30::0x10012018] 2
Also attached are the outputs from the compiler in both llvm and ppc assembly
code, in case this is useful.</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>