<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 --- - Code is "optimized" with -O0"
href="http://llvm.org/bugs/show_bug.cgi?id=16202">16202</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Code is "optimized" with -O0
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</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>tydeman@tybor.com
</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>Using the command line options: -std=c1x -O0 -pedantic
still "optimizes" some floating-point (FP) code and produces the wrong answer.
FP exceptions flags are not being raised when expected.
The wrong value is computed for: float f = (float)DBL_MIN; when the rounding
direction is upward (instead of the normal nearest).
How is a user supposed to turn off ALL floating-point optimizations?
Adding 'volatile' to all variables helps. But, I see no way to add volatile to
an expression of FP constants (other than rewrite the code using variables).
This is clang 3.3-0.4 on Intel Core 2 Duo in 32-bit mode running Fedora Core 19
Linux.
Aside: I do not see version 3.3 in the choices of Version when I opened this
bug
report.</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>