forwprop: Don't add uses to dce list if debug statement [PR116156]
The problem here is that when forwprop does a copy prop, into a statement,
we mark the uses of that statement as possibly need to be removed. But it just
happened that statement was a debug statement, there will be a difference when
compiling with debuging info turned on vs off; this is not expected.
So the fix is not to add the old use to dce list to process if it was a debug
statement.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR tree-optimization/116156
gcc/ChangeLog:
* tree-ssa-forwprop.cc (pass_forwprop::execute): Don't add
uses if the statement was a debug statement.
gcc/testsuite/ChangeLog:
* c-c++-common/torture/pr116156-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
This page took 0.164131 seconds and 6 git commands to generate.