This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, obvious] Remove double condition from dwarf2out.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 2 Sep 2016 19:00:11 +0200
- Subject: Re: [PATCH, obvious] Remove double condition from dwarf2out.c
- Authentication-results: sourceware.org; auth=none
- References: <b793dfdc-992d-f53a-babe-2f13f09c5caf@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Sep 02, 2016 at 07:52:45PM +0300, Kirill Yukhin wrote:
> Hi,
> Remove identical conditions from AND
> in return.
> Will check-in after bootstrap/regtest on i386|x86_64 as obvious.
>
> gcc/
> * dwarf2out.c (dw_val_equal_p): Remove redundant condition in
> return statement.
This isn't obvious, val_vms_delta uses both .lbl1 and .lbl2, for equality
I bet you want to compare both. I.e.
return (!strcmp (a->v.val_vms_delta.lbl1, b->v.val_vms_delta.lbl1)
- && !strcmp (a->v.val_vms_delta.lbl1, b->v.val_vms_delta.lbl1));
+ && !strcmp (a->v.val_vms_delta.lbl2, b->v.val_vms_delta.lbl2));
Jakub