Bug 16278 – [REG2.067] undefined reference when class template is instantiated only in 'is' expression

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-07-13T21:51:00Z
Last change time
2017-01-24T11:54:52Z
Assigned to
nobody
Creator
ag0aep6g

Comments

Comment #0 by ag0aep6g — 2016-07-13T21:51:10Z
test.d: ---- class A() { static struct S { A a; } } enum e = is(A!()); void main() {} ---- `dmd test.d`: ---- test.o:(.data._D25TypeInfo_xC4test6__T1AZ1A6__initZ+0x10): undefined reference to `_D4test6__T1AZ1A7__ClassZ' collect2: error: ld returned 1 exit status Error: linker exited with status 1 ---- Works with 2.066. Fails since 2.067. Works with the newer versions when -allinst is given.
Comment #1 by bitter.taste — 2017-01-12T21:08:34Z
Comment #2 by github-bugzilla — 2017-01-18T00:52:40Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/bdf0df926f90b9243932e2ff76f79de644224b26 Fix issue #16278 - Do not emit TypeInfo for speculative instantiations. https://github.com/dlang/dmd/commit/d7101f3e636d7aa970ddbab8623e5bebd7b96212 Merge pull request #6351 from LemonBoy/b16278 Fix issue #16278 - Do not emit TypeInfo for speculative instantiations.
Comment #3 by github-bugzilla — 2017-01-18T13:52:58Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/bdf0df926f90b9243932e2ff76f79de644224b26 Fix issue #16278 - Do not emit TypeInfo for speculative instantiations. https://github.com/dlang/dmd/commit/d7101f3e636d7aa970ddbab8623e5bebd7b96212 Merge pull request #6351 from LemonBoy/b16278
Comment #4 by github-bugzilla — 2017-01-24T11:54:52Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/bdf0df926f90b9243932e2ff76f79de644224b26 Fix issue #16278 - Do not emit TypeInfo for speculative instantiations. https://github.com/dlang/dmd/commit/d7101f3e636d7aa970ddbab8623e5bebd7b96212 Merge pull request #6351 from LemonBoy/b16278