Debian Codegraph @

gcc/testsuite/gdc.test/runnable/link10425.d

raw
1 // COMPILE_SEPARATELY:
2 // EXTRA_SOURCES: imports/bug10425.d
3
4 import imports.bug10425;
5
6 void main()
7 {
8 auto ti = typeid(A!());
9 /* Today, taking TypeInfo object address by using `typeid` always generates
10 * the TypeInfo object on comdat section (done by TypeInfoDeclaration::toObjFile),
11 * even if the associated struct belongs *non-root modules*.
12 *
13 * And, from 2.062, https://issues.dlang.org/show_bug.cgi?id=7511 is implemented.
14 * The attribute inference for member functions in instantiated struct may modify
15 * their actual mangled names. Then TypeInfo object compiled in this module would
16 * use wrong symbol names, to link non-template opEquals/opCmp/toHash/toString
17 * member functions.
18 *
19 * To fix the issue, we should run semantic3 to calculate the correct symbol names
20 * of the specific member functions.
21 */
22 }