<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/86995>86995</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP RT] omp_for_schedule_runtime.c test assert hit
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mikaoP
      </td>
    </tr>
</table>

<pre>
    This test fails if it is run with `KMP_BLOCKTIME=0`. In order to reproduce it I ran `ninja check-openmp`, then find the compiled file and manually run:
```
export LD_LIBRARY_PATH=/path/to/build/runtimes/runtimes-bins/openmp/runtime/src:$LD_LIBRARY_PATH
export KMP_BLOCKTIME=0
while (env OMP_SCHEDULE=static_steal,14 /path/to/build/runtimes/runtimes-bins/openmp/runtime/test/worksharing/for/Output/omp_for_schedule_runtime.c.tmp 2 14); do date; done
```
The command in the while is executed by lit, but this way is faster to reproduce.
The assert is:
```
Assertion failure at kmp_dispatch.cpp(1617): vnew.p.ub * (UT)chunk <= trip.
OMP: Error #13: Assertion failure at kmp_dispatch.cpp(1617).
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://github.com/llvm/llvm-project/issues/.
```
which is located in https://github.com/llvm/llvm-project/blob/main/openmp/runtime/src/kmp_dispatch.cpp#L1617
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVU1v2zgQ_TX0ZVBBomzXPvjgxBESNEGMrHvYk0FRI2kaiiT4ETf_fkHabbptc-hiAQMmQc7Mm_feiMJ7GjTihi2u2GI3EzGMxm0mehZmP2tN97o5jOQhoA_QC1IeqAcKQB5c1HCiMAJblp8e9ser-8frT4e7hxtW70q2LAu402Bchw6CAYfWmS5KTNF34IROcZr0FwFyRPn8wVjUk2XLkvFrCCNq6El3aQXSTJY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