[Issue 10817] New: Linker error with postcondition contract in a release library
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 13 07:14:28 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10817
Summary: Linker error with postcondition contract in a release
library
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: david.eckardt at sociomantic.com
--- Comment #0 from David Eckardt <david.eckardt at sociomantic.com> 2013-08-13 07:14:27 PDT ---
****
// Module in a library, compiled with -release
module a;
class A
{
int f ( )
out (x) {assert(x);}
body {return 1;}
}
****
// User code, compiled without -release
module b;
import a;
class B: A
{
override int f ( ) {return super.f();}
}
int main ( )
{
return (new B).f();
}
****
$ dmd -lib -release a.d
$ dmd b.d -La.a
b.o: In function `_D1b1B1fMFZi':
b.d:(.text._D1b1B1fMFZi+0x60): undefined reference to
`_D1a1A1fMFZi8__ensureMFKiZv'
Apparently B.f() references the postcondition of A.f(), which it overrides, but
that is omitted because A is compiled with -release.
This is very unfortunate as it can make it impossible to use a library that is
compiled with -release.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list