OSDN Git Service

PR c/43981
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 May 2010 19:08:37 +0000 (19:08 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 04:59:04 +0000 (13:59 +0900)
* c-parser.c (c_parser_direct_declarator_inner): Call mark_exp_read
on dimen.

* gcc.dg/Wunused-var-8.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159044 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wunused-var-8.c [new file with mode: 0644]

index 6179743..21f145e 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/43981
+       * c-parser.c (c_parser_direct_declarator_inner): Call mark_exp_read
+       on dimen.
+
 2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/43799
index 5b213ca..4b2fe7d 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-04  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/43981
+       * gcc.dg/Wunused-var-8.c: New test.
+
 2010-05-04  Jason Merrill  <jason@redhat.com>
 
        PR c++/38064
diff --git a/gcc/testsuite/gcc.dg/Wunused-var-8.c b/gcc/testsuite/gcc.dg/Wunused-var-8.c
new file mode 100644 (file)
index 0000000..1217719
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR c/43981 */
+/* { dg-do compile } */
+/* { dg-options "-Wunused" } */
+
+void g (char *);
+
+char
+f (int a)
+{
+  int len = a * 3;
+  char t[len];
+
+  g (t);
+  return t[0];
+}