<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 --- - Combining CHECK-DAG and CHECK-NOT sometimes causes an incorrect error-less failure"
href="http://llvm.org/bugs/show_bug.cgi?id=16450">16450</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Combining CHECK-DAG and CHECK-NOT sometimes causes an incorrect error-less failure
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>das@mips.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>Created <span class=""><a href="attachment.cgi?id=10763" name="attach_10763" title="test.txt">attachment 10763</a> <a href="attachment.cgi?id=10763&action=edit" title="test.txt">[details]</a></span>
test.txt
Overview:
Using CHECK-NOT between two CHECK-DAG's may result in a failure with no
error emitted. There are two locations in the CHECK-DAG processing that
CHECK-NOT is processed and one of them is handled incorrectly.
The one that is incorrect is taking the bool returned by CheckNot(),
casting it to size_t, then comparing it to a large unsigned value. This
comparison is always false whether the pattern is matched or not.
It seems that the testsuite only checks that successful matches of the
CHECK-NOT pattern trigger failures. I didn't find any tests that check that
unsuccessful matches permits successes.
Steps to reproduce:
* Run 'FileCheck -input-file test.txt test.txt' using the attached file.
* echo $?
Expected behaviour:
* No output
* Exit with 0
Actual behaviour:
* No output
* Exit with 1</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>