https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120310
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Guess one case is when tree DSE removes all stores to some automatic addressable variable, in that case it would be nice to populate debug stmts to all those removed locs and state what values it had there. Another case is where DSE keeps some stores to it and removes others. If it removes the last store before the var goes out of scope, perhaps adding debug stmt for that is fine too, but not sure what to do in case it removes a store because it is overwritten by a later store, say void qux (int *); void baz (void) { int a = 42; a = 43; qux (&a); } Because there dse1 does # DEBUG BEGIN_STMT - a = 42; # DEBUG BEGIN_STMT a = 43; and if we add # DEBUG a => 42 we'd need to add some debug stmt to say from this point on, value of a is in the a variable. Not sure if # DEBUG a => a would do it or if we'd need something else.