[Bug 161] New: GDC prevents backend from removing dead functions

via D.gnu d.gnu at puremagic.com
Thu Oct 9 05:20:34 PDT 2014


            Bug ID: 161
           Summary: GDC prevents backend from removing dead functions
           Product: GDC
           Version: development
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: Low
         Component: gdc
          Assignee: ibuclaw at gdcproject.org
          Reporter: johannespfau at gmail.com

Private functions which are never used could be removed by the GCC backend, but
we somehow prevent the backend from doing that.

Example: C
static void foo() {}
gcc -S -O test.c

private void foo() {}
gdc -S -O test.c

The problem is probably in d-decls.cc(FuncDeclaration::toSymbol) and is one of
(or a combination of) these: TREE_PUBLIC set, TREE_USED set, TREE_STATIC not

You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20141009/ac69f46e/attachment.html>

More information about the D.gnu mailing list