In the following example, ss should be constant propagated, but gcc does not do
it.


static int ss = 0;

extern bar();

int foo()
{
  ss = 10;
  bar();
  return ss;
}


-- 
           Summary: non address exposed static variable can not be
                    used/modified by external functions
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: xinliangli at gmail dot com


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

Reply via email to