PR c/71719
* c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
* c-c++-common/Wunused-var-15.c: New test.
From-SVN: r237937
+2016-07-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/71719
+ * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
+
2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
case IMAGPART_EXPR:
CASE_CONVERT:
case ADDR_EXPR:
+ case VIEW_CONVERT_EXPR:
mark_exp_read (TREE_OPERAND (exp, 0));
break;
case COMPOUND_EXPR:
+2016-07-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/71719
+ * c-c++-common/Wunused-var-15.c: New test.
+
2016-07-01 Jakub Jelinek <jakub@redhat.com>
PR fortran/71687
--- /dev/null
+/* PR c/71719 */
+/* { dg-do compile } */
+/* { dg-options "-Wunused -W -Wno-psabi" } */
+
+typedef unsigned V __attribute__ ((vector_size (16)));
+
+void bar (unsigned);
+
+V x;
+
+void
+foo (V v) /* { dg-bogus "set but not used" } */
+{
+ bar (v[0]);
+ V w = x; /* { dg-bogus "set but not used" } */
+ bar (w[1]);
+}
+
+/* Ignore a warning that is irrelevant to the purpose of this test. */
+/* { dg-prune-output ".*GCC vector passed by reference.*" } */