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

    <tr>
        <th>Summary</th>
        <td>
            openmp: can't build because of `integer value 40962 is outside the valid range of values [0, 31] for this enumeration type [-Wenum-constexpr-conversion]`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            build-problem
      </td>
    </tr>

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

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

<pre>
    ```

"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/build-llvm/./bin/clang++" --target=x86_64-pc-linux-gnu -DTARGET_NAME=AMDGPU -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/llvm/include" -I"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/build-llvm/include" -I"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/openmp/libomptarget/plugins/amdgpu/dynamic_hsa" -I"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/openmp/libomptarget/include" -I"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/openmp/libomptarget/plugins/amdgpu/impl" -I"/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/openmp/libomptarget/plugins/common/elf_common" -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/build-llvm/runtimes/runtimes-bins=build-llvm/runtimes/runtimes-bins -ffile-prefix-map=/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/= -no-canonical-prefixes -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -std=c++17 -O3 -DNDEBUG -fPIC  -fno-exceptions -MD -MT openmp/libomptarget/plugins/amdgpu/CMakeFiles/omptarget.rtl.amdgpu.dir/src/rtl.cpp.o -MF openmp/libomptarget/plugins/amdgpu/CMakeFiles/omptarget.rtl.amdgpu.dir/src/rtl.cpp.o.d -o openmp/libomptarget/plugins/amdgpu/CMakeFiles/omptarget.rtl.amdgpu.dir/src/rtl.cpp.o -c '/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp'
/build/llvm-toolchain-snapshot-16~++20220809071808+5146f84fd616/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:2096:14: error: integer value 40962 is outside the valid range of values [0, 31] for this enumeration type [-Wenum-constexpr-conversion]
      Agent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT,
             ^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNVttu4zYQ_Rr5RaAhS7ZsP_jB60saoLYXiYOiTwJNUjJbilRJypv063toaRMv2gItsJtdQaDE4XDmcG6ck-EviyhP-jdZR8myH9M0SrenViqOr1KXmnhjFDtTqYnTtHFn48koj6abKP2AN03SNJkl82Q6miUzECajcV7OxiXPwdWLIkEQJsNAkBojU1RXnQSojAnx1FbCR9n6eZYX-Zg0jCip22dS6TYm6-Py4W5zLPbL3QY8y9367uMTyEXxeFyvitVh_3hc7o_Fbrl6ODy-LWwPD7vl38k_3-_u36j3X_3Q_XGlZqrl4nrAr6_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