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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to