Test added by issue 15579 has been reverted.
c++ -m64 -c runnable_cxx/extra-files/cppb.cpp -o test_results/runnable_cxx/cppb.cpp.o -std=c++11
dmd -m64 -Irunnable_cxx -preview=in -checkaction=C -fPIC -L-lstdc++ -L--no-demangle -odtest_results/runnable_cxx -oftest_results/runnable_cxx/cppa_0 runnable_cxx/cppa.d test_results/runnable_cxx/cppb.cpp.o
Result in linker error:
---
test_results/runnable_cxx/cppb.cpp.o:cppb.cpp:_ZTV7Derived: error: relocation refers to global symbol "_ZThn16_N7Derived7MethodDEv", which is defined in a discarded section
section group signature: "_ZN7Derived7MethodDEv"
prevailing definition is from test_results/runnable_cxx/cppa_0.o
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
---
GDC and LDC do not have the same problem, they emit extern(C++) thunks with C++ mangling.
Comment #1 by robert.schadek — 2024-12-13T19:26:58Z