Strict aliasing
The rule in C and C++ that an object may only be read through a type compatible with how it was created. Break it and the code works without optimisation and falls apart with it.
The benefit to the compiler is substantial: allowed to assume that an int pointer and a float pointer can never point at the same memory, it can keep values in registers across stores, vectorise loops and reorder reads freely. Without the assumption every write through a foreign pointer has to be treated as potentially changing everything. The price is paid by all code that reinterprets bit patterns by casting a pointer, a pattern that was everyday practice in 1990s C and lives on in a great deal of signal processing and serialisation. The symptom is unpleasantly characteristic: everything works in the debug build and gives wrong answers in the optimised one. The legal routes are memcpy, unions in C and bit_cast in modern C++. The Linux kernel has instead chosen to build with the rule turned off.