https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108873
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > Well, it doesn't have side-effects, so why would it be emitted? Even though the side effect of deferencing here can be optimized away, VRP can notice that *e will be non-null after the statement happens and then later on optimize the "*e != 0" expression to being always true. I am not saying this is an important testcase to optimize but we are starting to get some of these testcases where doing early DCE of unused expressions will not do other optimizations regression testcases too ...