This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52577] __builtin_shuffle -Wunused-but-set-* false positives
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 08:35:58 +0000
- Subject: [Bug c/52577] __builtin_shuffle -Wunused-but-set-* false positives
- Auto-submitted: auto-generated
- References: <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);
}