<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 --- - wrong code at -O1 and higher"
href="https://llvm.org/bugs/show_bug.cgi?id=23490">23490</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>wrong code at -O1 and higher
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</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>Loop Optimizer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>daniel.salzman@nic.cz
</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=14313" name="attach_14313" title="Sources archive">attachment 14313</a> <a href="attachment.cgi?id=14313&action=edit" title="Sources archive">[details]</a></span>
Sources archive
The attached program, which is a part of DNS zone file parser, behaves
differently if compiled with the optimization -O1 or higher. The source code
was generated with Ragel (option -G2) and is relatively large.
Caution: The compilation takes some minutes!
(For the comparison, I have also attached slightly reduced variant of the
parser which is compiled without any problems also with -O1.)
Examples:
OK:
$ clang ./scanner.c -o scanner-O0 -O0 -lm
$ ./scanner-O0
OWNER=00
CLASS=0001
RRTTL=0000012C
RTYPE=0001
RDATA=01020304
== OK ==
Not OK:
$ clang ./scanner.c -o scanner-O1 -O1 -lm
$ ./scanner-O1
== OK ==</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>