public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/52577] __builtin_shuffle -Wunused-but-set-* false positives
Date: Tue, 13 Mar 2012 08:36:00 -0000	[thread overview]
Message-ID: <bug-52577-4-YeabzkYjQv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52577-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52577

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-03-13
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.7.1
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 08:35:58 UTC ---
Testcase for the false positive warnings:

/* PR c/52577 */
/* { dg-do compile } */
/* { dg-options "-Wall" } */

typedef int V __attribute__((vector_size (sizeof (int) * 4)));

void
f1 (V *p)
{
  V mask = { 1, 2, 3, 0 };
  *p = __builtin_shuffle (*p, mask);
}

void
f2 (V *p, V *q)
{
  V mask = { 1, 2, 3, 0 };
  *p = __builtin_shuffle (*p, *q, mask);
}

void
f3 (V *p, V *mask)
{
  V a = { 1, 2, 3, 0 };
  *p = __builtin_shuffle (a, *mask);
}

void
f4 (V *p, V *mask)
{
  V a = { 1, 2, 3, 0 };
  V b = { 2, 3, 4, 1 };
  *p = __builtin_shuffle (a, b, *mask);
}


  reply	other threads:[~2012-03-13  8:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13  8:33 [Bug c/52577] New: " jakub at gcc dot gnu.org
2012-03-13  8:36 ` jakub at gcc dot gnu.org [this message]
2012-03-13  8:59 ` [Bug c/52577] " jakub at gcc dot gnu.org
2012-03-13 21:25 ` jakub at gcc dot gnu.org
2012-03-22 10:11 ` jakub at gcc dot gnu.org
2012-03-22 10:12 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-52577-4-YeabzkYjQv@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).