re PR c++/78949 (incorrect "unused variable" warning with SSE2)
PR c++/78949 * typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has vector type. * c-c++-common/Wunused-var-16.c: New test. From-SVN: r244075
This commit is contained in:
parent
26c43e2744
commit
abec4284a6
|
@ -1,5 +1,9 @@
|
||||||
2017-01-04 Jakub Jelinek <jakub@redhat.com>
|
2017-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/78949
|
||||||
|
* typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
|
||||||
|
vector type.
|
||||||
|
|
||||||
PR c++/78693
|
PR c++/78693
|
||||||
* parser.c (cp_parser_simple_declaration): Only complain about
|
* parser.c (cp_parser_simple_declaration): Only complain about
|
||||||
inconsistent auto deduction if auto_result doesn't use auto.
|
inconsistent auto deduction if auto_result doesn't use auto.
|
||||||
|
|
|
@ -5907,6 +5907,8 @@ cp_build_unary_op (enum tree_code code, tree xarg, bool noconvert,
|
||||||
inform (location, "did you mean to use logical not (%<!%>)?");
|
inform (location, "did you mean to use logical not (%<!%>)?");
|
||||||
arg = cp_perform_integral_promotions (arg, complain);
|
arg = cp_perform_integral_promotions (arg, complain);
|
||||||
}
|
}
|
||||||
|
else if (!noconvert && VECTOR_TYPE_P (TREE_TYPE (arg)))
|
||||||
|
arg = mark_rvalue_use (arg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ABS_EXPR:
|
case ABS_EXPR:
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
2017-01-04 Jakub Jelinek <jakub@redhat.com>
|
2017-01-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/78949
|
||||||
|
* c-c++-common/Wunused-var-16.c: New test.
|
||||||
|
|
||||||
PR c++/78693
|
PR c++/78693
|
||||||
* g++.dg/cpp0x/pr78693.C: New test.
|
* g++.dg/cpp0x/pr78693.C: New test.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
/* PR c++/78949 */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-Wunused" } */
|
||||||
|
|
||||||
|
typedef unsigned char V __attribute__((vector_size(16)));
|
||||||
|
V v;
|
||||||
|
|
||||||
|
void
|
||||||
|
foo ()
|
||||||
|
{
|
||||||
|
V y = {};
|
||||||
|
V x = {}; // { dg-bogus "set but not used" }
|
||||||
|
y &= ~x;
|
||||||
|
v = y;
|
||||||
|
}
|
Loading…
Reference in New Issue