[LLVMbugs] [Bug 22635] New: -fdefine-sized-deallocation causes multiple symbol defintion errors on windows (mingw target)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 19 11:20:03 PST 2015


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

            Bug ID: 22635
           Summary: -fdefine-sized-deallocation causes multiple symbol
                    defintion errors on windows (mingw target)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: t.poechtrager at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat a.cpp
#include <string>

void b();

int main()
{
    auto x = new std::string[10];
    delete[] x;
    b();
}

$ cat b.cpp
#include <string>

void b()
{
    auto x = new std::string[10];
    delete[] x;
}

###

$ clang++ -target i686-w64-mingw32 [...] a.cpp -std=c++14
-fdefine-sized-deallocation -g -c
$ clang++ -target i686-w64-mingw32 [...] b.cpp -std=c++14
-fdefine-sized-deallocation -g -c

$ clang++ -target i686-w64-mingw32 [...] a.o b.o -o test
b.o:(.text+0xe0): multiple definition of `operator delete[](void*, unsigned
int)'
a.o:(.text+0x100): first defined here
collect2: error: ld returned 1 exit status
clang-3.7: error: linker (via gcc) command failed with exit code 1 (use -v to
see invocation)

-- 
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/20150219/ffcb0f6d/attachment.html>


More information about the llvm-bugs mailing list