https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |law at redhat dot com --- Comment #44 from Jeffrey A. Law <law at redhat dot com> --- I suspect in the context where SRA creates the V_C_E we don't have enough information to know that the range of the input object is constrained enough. We base the decision solely on the types. By the time we get into the middle end we can follow the use-def chain to the PHI and realize the source object only has two possible values at runtime and we can optimize the V_C_E into a NOP_EXPR. I've contacted Eric B. offline on the semantics of V_C_E. I think the agreement is in this kind of scenario we ought to be able to simplify it into a NOP_EXPR which should be sufficient to eliminate the false positive.