This happens in a released version? Without tests catching it?

Would your aarch64 test suite have caught it? Testing is fine and all, but it can only find bugs the test authors predicted. There will always be some issues that test suites miss.

It's obvious to add regression tests for this and related issues now that they've been found. And great! That's what regression tests are for. But testing is always going to be fundamentally incomplete in that it can only cover non-obvious things after they've already been encountered.

I would've expected a compiler to have a huge integration/regression test suite which just consists of other pieces of software's test suites. Grab the N most popular Haskell programs with test suites, compile them, run their test suites, verify that they still pass on the new version.

Isn’t rust doing something like that? Can’t seem to find the article right now but I remember reading something about this approach.

> Crater is a tool for compiling and running tests for every crate on crates.io (and a few on GitHub). It is mainly used for checking the extent of breakage when implementing potentially breaking changes and ensuring lack of breakage by running beta vs stable compiler versions.

https://rustc-dev-guide.rust-lang.org/tests/crater.html

https://github.com/rust-lang/crater

https://crater.rust-lang.org/

Even then such a bug as GHC's can conceivably not be detected.