[llvm-bugs] [Bug 43695] New: clang fatal error using __declspec(allocator) with -O3 : "error in backend: invalid symbol redefinition"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 16 12:01:53 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43695
Bug ID: 43695
Summary: clang fatal error using __declspec(allocator) with -O3
: "error in backend: invalid symbol redefinition"
Product: new-bugs
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: sylvain.audi at ubisoft.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
I discovered this bug with clang 9.0.0, under windows. It seems to be there in
trunk too.
Note that removing the _declspec(allocator), the expression in the alloc() call
parameter, or even the call to f2() will compile.
F:\>type test.cpp
__declspec(allocator) void *alloc(unsigned int size);
void f2();
void f1(unsigned int *size_ptr) {
void *hg = alloc(size_ptr ? *size_ptr : 1UL);
f2();
}
F:\>
F:\>
F:\>clang++.exe -cc1 -S -x86-asm-syntax=intel -debug-info-kind=limited
-fms-extensions -O3 -x c++ test.cpp
fatal error: error in backend: invalid symbol redefinition
Stack dump:
0. Program arguments: clang++.exe -cc1 -S -x86-asm-syntax=intel
-debug-info-kind=limited -fms-extensions -O3 -x c++ test.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'test.cpp'.
4. Running pass 'X86 Assembly Printer' on function '@"?f1@@YAXPEAI at Z"'
--
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/20191016/c371d353/attachment.html>
More information about the llvm-bugs
mailing list