<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/70225>70225</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
libc++ tests are failing on Windows after #69431
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
petrhosek
</td>
</tr>
</table>
<pre>
`libcxx/fuzzing/random.pass.cpp`, `std/depr/depr.c.headers/math_h.pass.cpp` and `std/numerics/c.math/cmath.pass.cpp` are all failing with tip-of-tree Clang after #69431 landed:
```
# .---command stderr------------
# | In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:12:
# | In file included from C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\cmath:319:
# | In file included from C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\math.h:301:
# | In file included from C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\math.h:11:
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:413:16: error: call to 'fpclassify' is ambiguous
# | 413 | return fpclassify(_X) == FP_NAN;
# | | ^~~~~~~~~~
# | C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:162:12: note: in instantiation of function template specialization 'isnan<short>' requested here
# | 162 | if (std::isnan(res)) {
# | | ^
# | C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:174:10: note: in instantiation of function template specialization 'helper<std::uniform_int_distribution<short>>' requested here
# | 174 | return helper<std::uniform_int_distribution<std::int16_t>>(data, size) ||
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:288:31: note: candidate function
# | 288 | _Check_return_ inline int fpclassify(_In_ float _X) throw()
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:293:31: note: candidate function
# | 293 | _Check_return_ inline int fpclassify(_In_ double _X) throw()
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:298:31: note: candidate function
# | 298 | _Check_return_ inline int fpclassify(_In_ long double _X) throw()
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:413:16: error: call to 'fpclassify' is ambiguous
# | 413 | return fpclassify(_X) == FP_NAN;
# | | ^~~~~~~~~~
# | C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:162:12: note: in instantiation of function template specialization 'isnan<bool>' requested here
# | 162 | if (std::isnan(res)) {
# | | ^
# | C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:176:10: note: in instantiation of function template specialization 'helper<std::bernoulli_distribution>' requested here
# | 176 | helper<std::bernoulli_distribution>(data, size) ||
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:288:31: note: candidate function
# | 288 | _Check_return_ inline int fpclassify(_In_ float _X) throw()
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:293:31: note: candidate function
# | 293 | _Check_return_ inline int fpclassify(_In_ double _X) throw()
# | | ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:298:31: note: candidate function
# | 298 | _Check_return_ inline int fpclassify(_In_ long double _X) throw()
# | | ^
# | In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:16:
# | In file included from C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\random:1686:
# | C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\__random/clamp_to_integral.h:35:87: error: shift count is negative [-Werror,-Wshift-count-negative]
# | 35 | return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
# | | ^ ~~~~~
# | C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\__random/clamp_to_integral.h:46:27: note: in instantiation of function template specialization 'std::__max_representable_int_for_float<short, double, true, -38>' requested here
# | 46 | const _IntT __max_val = __max_representable_int_for_float<_IntT, _RealT>();
# | | ^
# | C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\__random/poisson_distribution.h:181:31: note: in instantiation of function template specialization 'std::__clamp_to_integral<short, double>' requested here
# | 181 | return _VSTD::__clamp_to_integral<result_type>(__tx);
# | | ^
# | C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\__random/poisson_distribution.h:95:17: note: in instantiation of function template specialization 'std::poisson_distribution<short>::operator()<std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>>' requested here
# | 95 | {return (*this)(__g, __p_);}
# | | ^
# | C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:161:23: note: in instantiation of function template specialization 'std::poisson_distribution<short>::operator()<std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>>' requested here
# | 161 | volatile auto res = d(engine);
# | | ^
# | C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:177:10: note: in instantiation of function template specialization 'helper<std::poisson_distribution<short>>' requested here
# | 177 | helper<std::poisson_distribution<std::int16_t>>(data, size) ||
# | | ^
# | In file included from C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:16:
# | In file included from C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\random:1686:
# | C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\__random/clamp_to_integral.h:35:96: error: shift count is negative [-Werror,-Wshift-count-negative]
# | 35 | return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
# | | ^ ~~~~~
# | 4 errors generated.
# `-----------------------------
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWktv2zoW_jX0hrAhkXouvHCUGigGuBjMFNPZEbR0ZHFKkRqSStIu5rcPSMmJ82rd3LgBbiMIIikf8Rx950la3FqxVwBrlF6g9HLBR9dpsx7AmU5b-LLY6ebrGmWRFLv65gaRbTt--ybUHpGt4arR_Wrg1q7qYUBZhEiFURZZ1yCybWAwc7OqVx3wBoxFZNtz17Hu-DHMVXP3nBp7MKL2pPXKE_uOb-8_YgBzKXHLhRRqj6-F67ATw1K3S2cAcCW52mPeOjAYEZqVCY2x5KqBBtENii5RtPEiT-c0JBSvlstlrfvei2RdA8Ysj447OpRX-KPCrZCAharl2ECDW6N7XPnp02qH0sqitLpGaSUMSqubeSDlVb8Ml8Ho_0Dt_L0J3bRyYO-ND2in1UO06SYmdy_yY4nIdofI1qN6jchWeNXczAMvDNuNQnr450c96IhchHN7FaO0CjpAdEPj8pfyDaoPjKP4Zxg_oYKa1x34G0I1-toy23xBafV5GuG_Ceep4wil1cdZGj9cRau4jJJ45X8Ya-OOhYofy3R-7rU2UBvHbqVIYuplyRDdYDBGG9-pvX84jRHJ26GW3tXbr4jkWFjM-53Yj3q090XHOIkPvekw4Eaj8PEEBfs3IiVG9BLRS7z9O_tj8weiFw9n8sfxTIdb6Yf_HY7TcHt9x8nIwX2w0g58KxQWyjqunOBOaIV1i9tR1aHvoB8kd4DtALXgUnybaBDJhVVcIVrZThuH6AePr4H_jmAdNLgDAw9xiTMy90SLESl81KMbRDfTVKQwYBEpA8T5s6ii9MNboZcn_hq9BnodyAGMh-8AwqhEq03PhHKsEdYZsRs99TH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