https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102327
Bug ID: 102327 Summary: gcc/config/i386/i386-expand.c:14678: Suspicious coding ? Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Static analyser cppcheck says: gcc/config/i386/i386-expand.c:14678:8: style: Variable 'op1' is reassigned a value before the old one has been used. [redundantAssignment] Source code is /* Convert HFmode to HImode. */ op1 = gen_reg_rtx (HImode); op1 = gen_rtx_SUBREG (HImode, force_reg (HFmode, op), 0); I don't know the code, but if the return value from gen_reg_rtx isn't needed, then suggest don't assign it into op1.