[Issue 15459] New: stdio.byLine.each!(map!somefunc) compiles, fails to link with ld
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Dec 16 18:58:39 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15459
Issue ID: 15459
Summary: stdio.byLine.each!(map!somefunc) compiles, fails to
link with ld
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: link-failure
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: eiderdaus at gmail.com
http://dpaste.dzfl.pl/ce501c212d32
This code calls byLine, each, map!somefunc. It compiles fine, but fails to
link. Tested on my Linux machine with DMD 2.069.2 and on dpaste with DMD
2.069.1.
Expected: Either an error during compilation, or a well-linked executable.
Code copied here for convenience:
#!/usr/bin/rdmd
import std.stdio;
import std.algorithm;
char somefunc(in char c)
{
return c;
}
void main()
{
stdin
.byLine
.each!(map!somefunc);
}
dmd outputs:
/d773/f942.o: In function
`_D3std9algorithm9iteration32__T3mapS21_D4f9428somefuncFxaZaZ11__T3mapTAaZ3mapFNaNbNiNfAaZS3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult':
/d773/f942.d:(.text._D3std9algorithm9iteration32__T3mapS21_D4f9428somefuncFxaZaZ11__T3mapTAaZ3mapFNaNbNiNfAaZS3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult+0x30):
undefined reference to
`_D3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult6__ctorMFNaNbNcNiNfAaZS3std9algorithm9iteration41__T9MapResultS21_D4f9428somefuncFxaZaTAaZ9MapResult'
collect2: error: ld returned 1 exit status --- errorlevel 1
--
More information about the Digitalmars-d-bugs
mailing list