[llvm-bugs] [Bug 41472] New: LTO and Fortran COMMON blocks

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 11 14:33:52 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41472

            Bug ID: 41472
           Summary: LTO and Fortran COMMON blocks
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: lto
          Assignee: unassignedbugs at nondot.org
          Reporter: eric.schweitz at pgroup.com
                CC: llvm-bugs at lists.llvm.org

This bug relates to https://reviews.llvm.org/D54327#1452828

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190411/741cad24/attachment.html>


More information about the llvm-bugs mailing list