Description
There has been some confusion about whether a reference to _fltused should be generated on windows-msvc targets on architectures other than x86/x64 when compiling code with float types/values. I've talked to the MSVC team and have confirmed that the _fltused reference is generated on all architectures to trigger the initialization of some parts of the CRT.
Using this sample code:
float square(float num) {
return num * num;
}
I've verified these scenarios
MSVC x64 v19 latest - EXTRN _fltused:DWORD
MSVC x64 v192.0 VS16 - EXTRN _fltused:DWORD
MSVC x86 v19 latest - EXTRN __fltused:DWORD
MSVC ARM64 v19.latest - IMPORT |_fltused|
MSVC ARM v19 something -IMPORT |_fltused|
Clang 20.1.0 -target -target x86_64-pc-windows-msvc - .globl _fltused
Clang Trunk -target -target x86_64-pc-windows-msvc - .globl _fltused
Clang Trunk -target aarch64-pc-windows-msvc -
The net is that Clang does the wrong thing on the aarch64-pc-windows-msvc target.
This was a question raised in this PR but not resolved: #100368
Intend to bring a PR to fix this issue.