[Issue 24496] New: "Undefined reference to internal" when -c with SysTime.max in init
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 11 12:02:58 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24496
Issue ID: 24496
Summary: "Undefined reference to internal" when -c with
SysTime.max in init
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
Consider this code:
a.d:
module a;
import std.datetime;
struct AStruct
{
SysTime time = SysTime.max;
}
void main() { }
b.d:
module b;
import std.datetime;
struct BStruct
{
SysTime time = SysTime.max;
}
Compile it directly and it works:
$ dmd a.d b.d -oftest
$
But compile it incrementally:
$ dmd a.d b.d -c
$ dmd a.o b.o -oftest
/usr/bin/ld: b.o:(.data.rel.ro+0x8): undefined reference to `internal'
collect2: error: ld returned 1 exit status
--
More information about the Digitalmars-d-bugs
mailing list