http://llvm.org/bugs/show_bug.cgi?id=4377

           Summary: Emitting llvm bitcode and then assembling throws
                    multiple definition error
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=3087)
 --> (http://llvm.org/bugs/attachment.cgi?id=3087)
Contains three files, rng.cpp, rng.h, annealer_thread.cpp

The source files come from a PARSEC benchmark.

When I emit llvm bitcode and then assemble native code I get the following
error:
+ llvm-g++ -emit-llvm annealer_thread.cpp -c -o annealer_thread.o
+ llvm-g++ -emit-llvm rng.cpp -c -o rng.o
+ llc annealer_thread.o -f -o annealer_thread.s
+ llvm-g++ -c annealer_thread.s -o annealer_thread.o
+ llc rng.o -f -o rng.s
+ llvm-g++ -c rng.s -o rng.o
+ llvm-g++ annealer_thread.o rng.o
rng.o: In function `MTRand::reload()':
rng.s:(.text+0x50): multiple definition of `MTRand::reload()'
annealer_thread.o:annealer_thread.s:(.text+0xa0): first defined here
collect2: ld returned 1 exit status

When I don't everything works:
+ llvm-g++ annealer_thread.cpp -c -o annealer_thread.o
+ llvm-g++ rng.cpp -c -o rng.o
+ llvm-g++ rng.o annealer_thread.o


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to