This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/53347] New: Duplicated redundant condition in compare-elim.c
- From: "Paulo.Matos at csr dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 May 2012 15:44:09 +0000
- Subject: [Bug middle-end/53347] New: Duplicated redundant condition in compare-elim.c
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53347
Bug #: 53347
Summary: Duplicated redundant condition in compare-elim.c
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Paulo.Matos@csr.com
There's a duplicated redundant condition in compare-elim.c, line 148:
if (REG_P (XEXP (src, 0))
&& REG_P (XEXP (src, 0))
&& (REG_P (XEXP (src, 1)) || CONSTANT_P (XEXP (src, 1))))
return src;
This can be simplified:
if (REG_P (XEXP (src, 0))
&& (REG_P (XEXP (src, 1)) || CONSTANT_P (XEXP (src, 1))))
return src;
I think care must be taken to ensure that this is indeed duplicated and that
the developer didn't intend to write something else instead.