public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/22242] New: Removing unused static function variables
@ 2005-06-30  5:26 pinskia at gcc dot gnu dot org
  2005-06-30 17:40 ` [Bug middle-end/22242] " steven at gcc dot gnu dot org
  2005-07-13  3:07 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-30  5:26 UTC (permalink / raw)
  To: gcc-bugs

We don't remove unused static function variables.  Take the following code:
static int iii;
void f(int i)
{
  i = 0;
  if(i)
  {
   static int ii;
   const char *c = __FUNCTION__;
   iii = 0;
  }
}

There should be no ii or reference to __FUNCTION__.  We do remove the refence to iii though.

-- 
           Summary: Removing unused static function variables
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22242


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-13  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-30  5:26 [Bug middle-end/22242] New: Removing unused static function variables pinskia at gcc dot gnu dot org
2005-06-30 17:40 ` [Bug middle-end/22242] " steven at gcc dot gnu dot org
2005-07-13  3:07 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).