You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\wangrunqing\Downloads\testf> xmake -rvchecking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34618\bin\HostX64\x64\cl.exechecking for Microsoft Visual Studio (x64) version ... 2022checking for Microsoft C/C++ Compiler (x64) version ... 19.43.34618checking for nim ... nochecking for nim ... nochecking for link.exe ... C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34618\bin\HostX64\x64\link.exechecking for the linker (ld) ... link.exechecking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34618\bin\HostX64\x64\cl.exechecking for the c compiler (cc) ... cl.exechecking for C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34618\bin\HostX64\x64\cl.exe ... okchecking for flags (/O1) ... okchecking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34618\bin\HostX64\x64\cl.exechecking for the c++ compiler (cxx) ... cl.exe[ 50%]: compiling.release src\main.c"C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.43.34618\\bin\\HostX64\\x64\\cl.exe" -c -nologo /O1 -Fobuild\.objs\testf\windows\x64\release\src\main.c.obj src\main.cchecking for flags (cl_sourceDependencies) ... ok[ 75%]: linking.release testf.exe"C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\VC\\Tools\\MSVC\\14.43.34618\\bin\\HostX64\\x64\\link.exe" -nologo -dynamicbase -nxcompat -machine:x64 -out:build\windows\x64\release\testf.exe build\.objs\testf\windows\x64\release\src\main.c.obj[100%]: build ok, spent 0.907sPS C:\Users\wangrunqing\Downloads\testf> xmake rRead: 138, toInt64: 2 r: 2 <--- use incorrect initial value
When I use msvc 2022 and set the
/O1
optimization option, the compiler generates wrong instructions, causing reading the file to always return 0.https://developercommunity.visualstudio.com/t/Codegen-bug-on-x64-with-O1-optimize/10825899
tbox/src/tbox/platform/windows/file.c
Lines 150 to 159 in 8fe64e4
tb_long_t -> __init64 here
The text was updated successfully, but these errors were encountered: