This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C/C++ PATCH] Don't emit invalid VEC_COND_EXPR for vector comparisons (PR c/68062)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Jeff Law <law at redhat dot com>, Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Mar 2016 13:10:51 +0100
- Subject: Re: [C/C++ PATCH] Don't emit invalid VEC_COND_EXPR for vector comparisons (PR c/68062)
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1601131852060 dot 17296 at digraph dot polyomino dot org dot uk> <20160113195616 dot GL25528 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1601132311300 dot 9689 at digraph dot polyomino dot org dot uk> <20160120113151 dot GY25528 at redhat dot com> <20160127072601 dot GP25528 at redhat dot com> <56A8F82C dot 1050903 at redhat dot com> <20160127174509 dot GB25193 at redhat dot com> <CAMe9rOpjywOadWWO1YxHgQJQH4sF-XdMV+bqOh5wuhgEsTBYMg at mail dot gmail dot com> <20160128193308 dot GD25193 at redhat dot com> <CAFiYyc1X6enjON1u=vz_5w2Bu4CMYim6kMsmpVE_tZ2HfKWMnw at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Mar 02, 2016 at 12:43:07PM +0100, Richard Biener wrote:
> On Thu, Jan 28, 2016 at 8:33 PM, Marek Polacek <polacek@redhat.com> wrote:
> > On Thu, Jan 28, 2016 at 04:47:04AM -0800, H.J. Lu wrote:
> >> I got
> >>
> >> FAIL: c-c++-common/vector-compare-4.c -Wc++-compat (test for
> >> warnings, line 17)
> >> FAIL: c-c++-common/vector-compare-4.c -Wc++-compat (test for
> >> warnings, line 18)
> >> FAIL: c-c++-common/vector-compare-4.c -Wc++-compat (test for
> >> warnings, line 34)
> >> FAIL: c-c++-common/vector-compare-4.c -Wc++-compat (test for
> >> warnings, line 35)
> >
> > Ah, patch(1) bogosity, fixed now. Sorry about that.
>
> Note on i?86 I see (or x86_64 with -m32 -march=i586)
>
> /space/rguenther/src/svn/gcc-5-branch/gcc/testsuite/c-c++-common/vector-compare-4.c:29:1:
> warning: SSE vector return without SSE enabled changes the ABI
> [-Wpsabi]^M
>
> and thus the testcase fails (it has been adjusted for a similar kind
> of error on ppc
> on trunk but not yet on the branch(es)).
Thus should fix that (your new PR70022 test fails similarly, but here we can
use -w, on vector-compare-4.c which expects other warnings we need the prune
for powerpc; though, as has been said earlier, it would be better if
rs6000 started honoring -Wno-psabi and emitted inform rather than warning).
Ok for trunk?
2016-03-02 Jakub Jelinek <jakub@redhat.com>
PR c/68062
* c-c++-common/vector-compare-4.c: Add -Wno-psabi to dg-options.
PR middle-end/70022
* gcc.dg/pr70022.c: Add -w -Wno-psabi to dg-options.
--- gcc/testsuite/c-c++-common/vector-compare-4.c.jj 2016-02-03 23:36:38.000000000 +0100
+++ gcc/testsuite/c-c++-common/vector-compare-4.c 2016-03-02 13:07:29.229073904 +0100
@@ -1,6 +1,6 @@
/* PR c/68062 */
/* { dg-do compile } */
-/* { dg-options "-Wsign-compare" } */
+/* { dg-options "-Wsign-compare -Wno-psabi" } */
/* Ignore warning on some powerpc configurations. */
/* { dg-prune-output "non-standard ABI extension" } */
--- gcc/testsuite/gcc.dg/pr70022.c.jj 2016-03-01 19:23:49.000000000 +0100
+++ gcc/testsuite/gcc.dg/pr70022.c 2016-03-02 13:04:06.531860784 +0100
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "-w -Wno-psabi" } */
typedef int v4si __attribute__ ((vector_size (16)));
Jakub