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: unassignedb...@nondot.org
          Reporter: eric.schwe...@pgroup.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to