While I agree undefined behavior is annoying and a huge UX issue, end of the day the bug is in your code not in the compiler.
Also having an -O0 debug build is standard practice.
My point isn't that compilers are super easy to use and never frustrating, my point is that the notion that LLMs "compile" english to code is a bad analogy. Compilation is a translation from one formal representation to another. LLMs are an interpretation of informal language into a formal language. They just are not at all the same thing.