https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127201
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-09-05
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
+ if (!VAR_P (decl)
+ && TREE_CODE (decl) != PARM_DECL
+ && TREE_CODE (decl) != RESULT_DECL)
I think this can be just simplified down to:
if (!DECL_P (decl))
Since otherwise you might miss CONST_DECL (which shows up for fortran code) and
FUNCTION_DECL and LABEL_DECL (this might show up on undefined code).
Otherwise this seems like a good addition.
I wonder if there might be a way to produce a CS-elim testcase too. Since that
uses DR in some cases. Likewise DSE.