This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug middle-end/22242] New: Removing unused static function variables


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


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