<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 - Incorrect mersenne_twister_engine equality comparison on initial seed states"
   href="https://bugs.llvm.org/show_bug.cgi?id=38469">38469</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect mersenne_twister_engine equality comparison on initial seed states
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hstong@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20654" name="attach_20654" title="Program as described in the Description">attachment 20654</a> <a href="attachment.cgi?id=20654&action=edit" title="Program as described in the Description">[details]</a></span>
Program as described in the Description

[rand.req.eng] specifies the comparison between two engines as returning true
if the infinite sequences of values that would be generated by repeated calls
to their respective operator()s are equivalent.

The attached program seeds two mersenne_twister_engines with specific states.
It asserts that the values returned by the engines match for some number of
calls, and that the engines are considered equivalent after that set of calls.

It then asserts that the engines were equivalent before those calls.
The assertion fails; however, either an earlier assertion should have failed,
or the engines before those calls do indeed produce equivalent infinite
sequences of values.

Online compiler: <a href="https://wandbox.org/permlink/a3frEvZRLgezujN1">https://wandbox.org/permlink/a3frEvZRLgezujN1</a>


=== COMPILER INVOCATION:
clang++ -stdlib=libc++ -std=c++17 -pedantic-errors -Wall -Wextra -Werror -xc++
mteEqSeededStates.cc -o ./a.out


=== RUN SCRIPT:
./a.out


=== EXPECTED RUN OUTPUT:
(Exits with rc=0).


=== ACTUAL RUN OUTPUT:
a.out: mteEqSeededStates.cc:74: int main(): Assertion
`enginesCompareEqualOnInit' failed.


=== COMPILER VERSION INFO (clang++ -v):
clang version 8.0.0 (<a href="https://github.com/llvm-mirror/clang.git">https://github.com/llvm-mirror/clang.git</a>
074cccc152df061007c8500515698b57a5af7103)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
40868d437198d20a353ce4f4fb114b4d33efe5aa)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/wandbox/clang-head/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Selected multilib: .;@m64</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>