<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:56.7pt 42.5pt 56.7pt 85.05pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thanks for reporting the problem.<o:p></o:p></p>
<p class="MsoNormal">I’ve poster patch <a href="https://reviews.llvm.org/D95485">
https://reviews.llvm.org/D95485</a> with the fix.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Andrey<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Openmp-dev <openmp-dev-bounces@lists.llvm.org> <b>
On Behalf Of </b>Joseph Shen via Openmp-dev<br>
<b>Sent:</b> Tuesday, January 26, 2021 4:36 PM<br>
<b>To:</b> openmp-dev@lists.llvm.org<br>
<b>Subject:</b> [Openmp-dev] Openmp Win32 build failed for KF_TRACE<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi, Openmp devs:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When I compiled Openmp with clang-cl(self-build-from-v11.01), three errors were triggered by the compiler. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">These errors all happened in KF_TRACE, for <b>printf the flag value with type std::atomic<unsigned int> </b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><b>but using unnecessary `flag->get() then get pointer value`;
</b>and for the second error, <b>printf used format</b><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><b>%d for unsigned value</b>.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Patch is given in the attached file, and the compile error message is listed below.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your hard work.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Joseph Shen.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">--------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">[1/2] Building CXX object projects\openmp\runtime\src\CMakeFiles\omp.dir\z_Windows_NT_util.cpp.obj<br>
FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Windows_NT_util.cpp.obj<br>
T:\llvm_dist_s6\bin\clang-cl.exe  .... -c -- T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp<o:p></o:p></p>
<div>
<p class="MsoNormal"> ----  ERROR  1 ---    <o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(384,38): error: call to deleted constructor of 'std::atomic<unsigned int>'<br>
               th_gtid, flag->get(), *(flag->get())));<br>
                                     ^~~~~~~~~~~~~~<br>
T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'<br>
    __kmp_debug_printf x;                                                      \<br>
                       ^<br>
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(446,3): note: in instantiation of function template specialization '__kmp_suspend_template<kmp_flag_32>' requested here<br>
  __kmp_suspend_template(th_gtid, flag);<br>
  ^<br>
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here<br>
    atomic(const atomic&) = delete;<br>
    ^<o:p></o:p></p>
<div>
<p class="MsoNormal">   ----  ERROR  2 ---     <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(244,41): error: call to deleted constructor of 'std::atomic<unsigned int>'<br>
                    flag->get(), old_f, *(flag->get())));<br>
                                        ^~~~~~~~~~~~~~<br>
T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'<br>
    __kmp_debug_printf x;                                                      \<br>
                       ^<br>
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(414,9): note: in instantiation of function template specialization '__kmp_win32_cond_wait<kmp_flag_32>' requested here<br>
        __kmp_win32_cond_wait(&th->th.th_suspend_cv, &th->th.th_suspend_mx, th,<br>
        ^<br>
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(446,3): note: in instantiation of function template specialization '__kmp_suspend_template<kmp_flag_32>' requested here<br>
  __kmp_suspend_template(th_gtid, flag);<br>
  ^<br>
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here<br>
    atomic(const atomic&) = delete;<br>
    ^<br>
 ----  ERROR  3 ---    <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
T:\llvm-project-11.0.1.src\openmp\runtime\src\z_Windows_NT_util.cpp(491,62): error: call to deleted constructor of 'std::atomic<unsigned int>'<br>
                   gtid, target_gtid, flag->get(), old_spin, *(flag->get())));<br>
                                                             ^~~~~~~~~~~~~~<br>
T:\llvm-project-11.0.1.src\openmp\runtime\src/kmp_debug.h(103,24): note: expanded from macro 'KF_TRACE'<br>
    __kmp_debug_printf x;                                                      \<br>
                       ^<br>
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\atomic(2165,5): note: 'atomic' has been explicitly marked deleted here<br>
    atomic(const atomic&) = delete;<br>
    ^<br>
<br>
8 warnings and 3 errors generated.<br>
ninja: build stopped: subcommand failed.<o:p></o:p></p>
</div>
</div>
</div>
<p><br>--------------------------------------------------------------------<br>Joint Stock Company Intel A/O<br>Registered legal address: Krylatsky Hills Business Park, <br>17 Krylatskaya Str., Bldg 4, Moscow 121614, <br>Russian Federation</p><p>This e-mail and any attachments may contain confidential material for<br>the sole use of the intended recipient(s). Any review or distribution<br>by others is strictly prohibited. If you are not the intended<br>recipient, please contact the sender and delete all copies.</p>
</body>
</html>