https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118220
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think the end of the discussions was that it is more important to optimize the majority of sanely written code instead of having workarounds for a couple of non-real-world weird tests, which can be further obfuscated or use -fno-malloc-dce. Note, the PR118224 hack I've just attached there will most likely "fix" this testcase too, as the argument is too large constant. But if you go through volatile or hide it non-inlinable function calls etc., it will still "misbehave". Real-world code doesn't call a possibly huge allocation function just to find out if the argument isn't too large to make pointer arithmetics invalid (especially when most C libraries don't guarantee that at all and will happily succeed).