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 c/13134] New: Visibility attribute is ignored


The change to visibility handling that was checked in on Nov 6 seems to have
broken visibility pretty badly.  Setting the visibility attribute on a C
function declaration no longer causes the function to be emitted with the given
visibility.

To reproduce this, compile the attached testcase:
gcc -c -o visibility.o visibility.c

and check the output with readelf:
readelf -s visibility.o

It will show visibility DEFAULT for all of the functions in this object file:
    7: 00000000      5 FUNC    GLOBAL DEFAULT        1 func1
    8: 00000005      5 FUNC    GLOBAL DEFAULT        1 func2
    9: 0000000a      5 FUNC    GLOBAL DEFAULT        1 func3
   10: 0000000f      5 FUNC    GLOBAL DEFAULT        1 func4
   11: 00000014      5 FUNC    GLOBAL DEFAULT        1 func5
   12: 00000019      5 FUNC    GLOBAL DEFAULT        1 func6
   13: 0000001e      5 FUNC    GLOBAL DEFAULT        1 func7
   14: 00000023      5 FUNC    GLOBAL DEFAULT        1 func8

-- 
           Summary: Visibility attribute is ignored
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bryner at brianryner dot com
                CC: austern at apple dot com,gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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