<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - ConstantRangeTest.cpp missing things in "exhaustive" test"
href="https://bugs.llvm.org/show_bug.cgi?id=49273">49273</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ConstantRangeTest.cpp missing things in "exhaustive" test
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>paul_robinson@playstation.sony.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>In ConstantRangeTest.cpp, `testBinarySetOperationExhaustive` appears to be
iterating through a bunch of combinations of ConstantRange in order to test
some other operation.
Leading up to line 585, there is the following code:
// Unsigned: Non-wrapped set, then smaller set, then any set.
bool Variant1Full = Variant1.isFullSet() || Variant1.isWrappedSet();
bool Variant2Full = Variant2.isFullSet() || Variant2.isWrappedSet();
if (!Variant1Full && Variant2Full)
EXPECT_EQ(Variant1, UnsignedCR);
else if (Variant1Full && !Variant2Full)
EXPECT_EQ(Variant2, UnsignedCR); // << line 585
...
That test assertion is never executed, because Variant2Full is always true.
In fact you can `assert(Variant2Full);` immediately after its assignment,
and the assertion never triggers.
This suggests that the code to iterate through the Variant1/Variant2
combinations isn't hitting everything it should be, or possibly there is
some other problem. This is an area I have no context for, so I have no
patches to suggest.
Found by the Rotten Green Tests project.</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>