re PR c++/44443 (-Wunused-but-set-variable problem with unused attribute on type)
authorJakub Jelinek <jakub@redhat.com>
Mon, 7 Jun 2010 17:49:06 +0000 (19:49 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 7 Jun 2010 17:49:06 +0000 (19:49 +0200)
commit026698d28e6eac591edfc8b1fd397e73b0503c56
tree9683a15333492961769147bbff3993b18d63fafa
parent75522f217e551de6b210c2c2e963a8386344ae99
re PR c++/44443 (-Wunused-but-set-variable problem with unused attribute on type)

PR c++/44443
* decl.c (initialize_local_var): If TREE_USED is set on the type,
set also DECL_READ_P on the decl.

* c-c++-common/Wunused-var-11.c: New test.

From-SVN: r160387
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wunused-var-11.c [new file with mode: 0644]