<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - LTO and Fortran COMMON blocks"
   href="https://bugs.llvm.org/show_bug.cgi?id=41472">41472</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LTO and Fortran COMMON blocks
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>lto
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>eric.schweitz@pgroup.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This bug relates to <a href="https://reviews.llvm.org/D54327#1452828">https://reviews.llvm.org/D54327#1452828</a>

I'll just quote Paul's explanation here. 

"Regarding your LTO-like experiments, that result is more or less what I
thought would happen. In a normal compilation, each CU gets its own description
of the types, and the fact that they are different in different CUs doesn't
matter. Within each CU's context, the common-block description is complete and
will be used correctly by the debugger.

"In LTO, however, the IR linker wants to de-duplicate debug information, to
avoid multiple copies of the same type in the final object file. I suspect that
de-duplication (which IIRC is founded on the C++ "one definition rule")
probably should not apply to Fortran, or at least not to common blocks."

Indeed, it is quite true that in Fortran a single COMMON block can be mapped to
different sets of variable names in different scopes.</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>