<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 --- - Redefinition of 'tan' provokes assert"
href="https://llvm.org/bugs/show_bug.cgi?id=28143">28143</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Redefinition of 'tan' provokes assert
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>carlo.bertolli@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The following program:
extern int tan (void);
int main (void) {
tan();
return 0;
}
Compiled with:
clang t53.c -O
Returns the following assert
clang-3.9: /localhd/cbertol/trunk/src/include/llvm/IR/Instructions.h:1554:
llvm::Value *llvm::CallInst::getArgOperand(unsigned int) const: Assertion `i <
getNumArgOperands() && "Out of bounds!"' failed.
It looks like that llvm is trying to simplify 'tan' as if it were the math.h
declaration, and not the re-declaration.
Compiled on bare-metal ubuntu on power 8 with:
llvm a94e734
clang e03851a
Using clang 3.8.1 does not result in error, but linking error as 'tan' is not
defined.</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>