Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cmuratori/48ab8f6a6d78196e1323d4a0796e7732 to your computer and use it in GitHub Desktop.
Save cmuratori/48ab8f6a6d78196e1323d4a0796e7732 to your computer and use it in GitHub Desktop.
Microsoft Visual Studio 2012 Internal Compiler Error
// Put this in a .c file and cl it to cause the internal compiler error. It also crashes as a .cpp, but you have to extern "C" the declarations.
typedef union __m128 {float m128_f32[4];} __m128;
__m128 _mm_load_ps(float const *);
void _mm_store_ps(float *, __m128);
void main(void) {_mm_store_ps(0, _mm_load_ps(0));}
@cmuratori
Copy link
Author

Yes, we know :) That is where this GIST came from in the first place:

"Today's fun discovery: removing the __declspec's from the definition of __m128 causes MSVC to ICE on any SSE intrinsic."

https://twitter.com/cmuratori/status/751284570297806851

  • Casey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment