This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fortran/892: -Wunused complains unnecessarily for COMMON block items


The following reply was made to PR fortran/892; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: toon@moene.indiv.nluug.nl
Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: fortran/892: -Wunused complains unnecessarily for COMMON block items
Date: Tue, 28 Nov 2000 14:57:13 -0800

 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),

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]