<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - -fvisibility=hidden and -fvisibility-inlines-hidden being ignored"
   href="https://llvm.org/bugs/show_bug.cgi?id=24648">24648</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-fvisibility=hidden and -fvisibility-inlines-hidden being ignored
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dx-mon@users.sourceforge.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14802" name="attach_14802" title="Files required to reproduce bug">attachment 14802</a> <a href="attachment.cgi?id=14802&action=edit" title="Files required to reproduce bug">[details]</a></span>
Files required to reproduce bug

If more than one compilation unit defines a structure (but not function) for
internal-only consumption to that unit - and the units use the same name for
the struct - the visibility options given for the unit are being ignored. The
structures will both be visible in the resulting object file for the linker.

When passed to the linker, as a result, only the first unit's copy of the
structure will be used in all function calls relating to that structure
assuming identical struct APIs. I can only hate to think what would happen if
an extra function were present in one struct but not the other as to how
confusing this bug would then become.

Expected result of attached test-case:
.0:3636363636363636:.1:3636363636363636:.2:3636363636363636:.3:3636363636363636:.4:3636363636363636:.5:3636363636363636:.6:3636363636363636:.7:3636363636363636:.8:3636363636363636:.9:3636363636363636:.10:3636363636363636:.11:3636363636363636:.12:3636363636363636:.13:3636363636363636:.14:3636363636363636:.15:3636363636363636:.16:115D5D5D5D5D5D5C:.17:115D5D5D5D5D5D5C:.18:BAB1CB61E1E1E1EB:.19:BAB1CB61E1E1E1EB:.20:850799225F926293:.21:850799225F926293:.22:002855843476C491:.23:DB4F7CAB5B9DEBB7:.24:4EA502478EAC4DE7:.25:8289669AF76D9AC5:.26:1BD7B2BB2469893A:.27:8D98B1B6D36C18B4:.28:D874990310946583:.29:51854BBF0209EBB3:.30:8B3C5594EED682C8:.31:8992A4AD535C67DB:.32:741B59D84DD212FF:.33:271466D04FD59E95:.34:6337022C6CBDA380:.35:6F20EC9AEEE97A85:.36:D2DE6A28DEE03D4E:.37:79438B74E6340A7C:.38:77975CB77134F1B2:.39:DAA31F4B4C8BEFE7:.40:9ECF883A732718BC:.41:C91697C4EE07F55B:.42:95647C8A4809D414:.43:84058A64F1470D3C:.44:00DD35881DCB2ED9:.45:18BBEC39E6490440:.46:E7655329025DA3BE:.47:53293B56BD193AB7:
 .48:D0D5D248AF960575:.49:2D0B4FA87021F0C0:.50:5EA123211A939DD2:.51:ED0CCFA96C01F804:.52:B38E2DDB27EC1E65:.53:3ECECA30A5E5BE4C:.54:F372E2B24022BFD5:.55:DF82738DA8254AF7:.56:5A4BA8B3B1BE3882:.57:DCF8BBF9FD73FB34:.58:16243856BFDD6668:.59:2CD45C99CB0C1FA4:.60:A9D48A719FDDD773:.61:BEAF0574D573EF8E:.62:DC37223CF9AEA404:.63:D403BBC395775553:.64:BB0A9F31485EA09D:.65:8ACAA568F0FCD6DC:.66:0DD256D7078712E4:.67:229A6F427B066627:.68:525AE7EF2B796B72:.69:2150CAEA329D023B:.70:A0087C75D4203B1C:.71:F49C8BAF2210ED1E:.72:45CFF8AC11595B82:.73:088974F8E6A4B1B7:.74:EEF6AC7E505923D8:.75:F79EE0354BF41C80:.76:EC2F6DAF7848EDE8:.77:06F0AF3C39FB69A3:.78:08C854623BD76871:.79:B5C6E02CC9A38C05

Actual result:
0:0000000036363636:1:0000000036363636:2:0000000036363636:3:0000000036363636:4:0000000036363636:5:0000000036363636:6:0000000036363636:7:0000000036363636:8:0000000036363636:9:0000000036363636:10:0000000036363636:11:0000000036363636:12:0000000036363636:13:0000000036363636:14:0000000036363636:15:0000000036363636:16:000000003163E3E3:17:000000003163E3E3:18:00000000E11539F8:19:00000000E11539F8:20:000000008F8EBD79:21:000000008F8EBD79:22:00000000DCC3A92C:23:00000000D7F156D9:24:00000000F0460653:25:000000007FF4C4A8:26:00000000C2522EFF:27:00000000A7CAE80B:28:00000000FF7CA8BE:29:00000000234E5C2F:30:00000000B6C633B1:31:0000000044CD5AC5:32:00000000C9927CA5:33:000000009D800194:34:000000009E731070:35:000000002F22495C:36:00000000EA9F8311:37:000000005C4E1158:38:0000000050493177:39:00000000A490BA7F:40:00000000BA72C729:41:00000000D531E922:42:00000000E6881044:43:00000000A429BAF9:44:000000003302A795:45:0000000056FBA245:46:00000000372D4E56:47:000000007247FA41:48:00000000E89EA338:49:00000000BD6ABC1F:50:00000
 000F84B20CE:51:000000004A0B1A6B:52:0000000075432054:53:000000002ADA0E8E:54:000000007C13EF98:55:00000000C9BC9863:56:000000002742A472:57:000000003D9A2849:58:00000000C0C4BFAF:59:00000000F072D8BE:60:000000008ED2B62A:61:0000000003A2CAFB:62:000000008119B504:63:0000000099B97AD0:64:000000009A0BCFE4:65:000000005B0DF9CD:66:00000000A035FE3E:67:000000008AFF9548:68:000000005483F42C:69:00000000A8BFF47F:70:00000000931002E7:71:00000000B21CCF12:72:00000000A336DC68:73:00000000448A9DC0:74:00000000D716DFFB:75:000000004B8D257A:76:000000003097DBA9:77:000000004113836C:78:0000000036949B86:79:0000000018488C64

This code works correctly as expected when passed to MSVC's cl.exe, or GCC's
g++.
Reproduction of Clang results performed on a x86_64 Mac running Mac OSX as well
as a x86_64 PC running Linux. Results are identical.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>