[LLVMbugs] [Bug 20915] New: One definition rule violation in lib/Analysis

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 11 23:28:58 PDT 2014


            Bug ID: 20915
           Summary: One definition rule violation in lib/Analysis
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: octoploid at yandex.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

gcc trunk has a new warning -Wodr that reports odr violations when 
building with -flto. It shows the following issue:

[278/983] Linking CXX shared library lib/libLLVMAnalysis.so
/var/tmp/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:44:0: warning:
type ‘struct Query’ violates one definition rule [-Wodr]
 struct Query {
/var/tmp/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:65:0: note: a
different type is defined in another translation unit
 struct Query {
/var/tmp/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:45:21: note:
the first difference of corresponding definitions is field ‘DL’
   const DataLayout *DL;
/var/tmp/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:66:0: note: a field
with different name is defined in another translation unit
   ExclInvsSet ExclInvs;

Unfortunately gcc crashes later in the build process. I will attach a full
list of odr violations once that ICE gets fixed.

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/20140912/31a1653d/attachment.html>

More information about the llvm-bugs mailing list