unsigned int{16,32,64}_t at global scope causes Segfault (attempted to read from 0x8)
unsigned int16_t g;
result
Internal compiler error: access violation. Attempted to read from address 0x0000000000000008
Qualifiers (static, extern...) don't change the observable behavior.
Fun fact: use a matrix/vector expansion (uint16_t1x1) and it doesn't crash anymore
Well, that's unfortunate. 😣
Just in case you're unaware, the expected way to get an unsigned 16-bit integer is to use uint16_t which worked when I tried it. Obviously we shouldn't crash with this usage, but just in case this is blocking you I hope that helps.
Thanks. It's ok it doesn't block me, I'm just here to be your nemesis :p
I ran across this issue myself recently. There's something gnarly about how 16-bit type aliases are handled:
https://godbolt.org/z/M4TfanMfr