fortran/892: -Wunused complains unnecessarily for COMMON block items
Richard Henderson
rth@redhat.com
Tue Nov 28 14:57:00 GMT 2000
On Sun, Nov 26, 2000 at 04:26:29PM -0000, toon@moene.indiv.nluug.nl wrote:
> SUBROUTINE SUB
> COMMON /COM/ A
> END
[...]
> unused.f:3: warning: unused variable `a'
Fixed thus.
r~
* com.c (ffecom_member_phase2_): Set TREE_USED on the debugging decl.
Index: com.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/com.c,v
retrieving revision 1.99
diff -c -p -d -r1.99 com.c
*** com.c 2000/11/10 20:36:15 1.99
--- com.c 2000/11/28 22:55:36
*************** ffecom_member_phase2_ (ffestorag mst, ff
*** 7110,7115 ****
--- 7110,7116 ----
TREE_STATIC (t) = TREE_STATIC (mt);
DECL_INITIAL (t) = NULL_TREE;
TREE_ASM_WRITTEN (t) = 1;
+ TREE_USED (t) = 1;
DECL_RTL (t)
= gen_rtx (MEM, TYPE_MODE (type),
More information about the Gcc-bugs
mailing list