[Bug target/102327] New: gcc/config/i386/i386-expand.c:14678: Suspicious coding ?
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 14 15:00:23 GMT 2021
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.
More information about the Gcc-bugs
mailing list