This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fold_binary_loc BIT_XOR_EXPR folding (PR sanitizer/80349)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 27 Apr 2017 22:58:36 +0200
- Subject: Re: [PATCH] Fix fold_binary_loc BIT_XOR_EXPR folding (PR sanitizer/80349)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0FF1867EC3
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0FF1867EC3
- References: <20170427191744.GE4255@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Apr 27, 2017 at 09:17:44PM +0200, Marek Polacek wrote:
> Yet another missing converts caused that BIT_XOR_EXPRs with incompatible
> arguments have gotten into the gimplifier. Fixed thus. This patch also
> improves readability by using a temporary, the current style wasn't very
> readable especially because of the wrong formatting caused by adding the
> *_loc variants...
Yeah, this is indeed much more readable.
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2017-04-27 Marek Polacek <polacek@redhat.com>
>
> PR sanitizer/80349
> * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
> arg10 and arg11 to itype.
>
> * c-c++-common/ubsan/pr80349.c: New test.
Ok for trunk and after a while for 7.2.
Jakub