LDC 0.15.0 alpha1 released! Please help test!

Anonymus via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri Oct 24 13:56:27 PDT 2014


Not sure wether this is an issue at all: I get some strange 
behaviour when I try to mix dmd and LDC generated *.o-files:
//versions:
DMD64 D Compiler v2.066.0

linux-x86_64 LDC

//code:
module a;

int foo(int a) {
	return a;
}

module b;

import a;
import std.stdio;

void main() {
	writeln(foo(2));
}


dmd a.d -c
ldc2 b.d a.o
./b
output:
object.Exception@/build/src/ldc/runtime/phobos/std/stdio.d(2156): 
Enforcement failed

dmd a.d -c
ldc2 b.d -c
ldc2 b.o a.o
./b
output:
2

dmd b.d -c
ldc2 b.o a.d
output:
b.o: In Funktion 
`_D3std9exception105__T12errnoEnforceTiVAyaa35_2f7573722f696e636c7564652f646d642f70686f626f732f7374642f737464696f2e64Vmi2113Z12errnoEnforceFNfiLAyaZi':
b.d:(.text._D3std9exception105__T12errnoEnforceTiVAyaa35_2f7573722f696e636c7564652f646d642f70686f626f732f7374642f737464696f2e64Vmi2113Z12errnoEnforceFNfiLAyaZi+0x6a): 
Nicht definierter Verweis auf `_d_throwc'
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1


If dmd does the linking, there are even more different results...
I also have a ldc version build from github source at 20.10.2014 
(0.14 was broken for me) where I get
dmd -c a.d
ldc2 b.d a.o
./b
2
Ungültiger Maschinenbefehl

Note that I usually compile everything with the same compiler and 
LDC 0.15 seems to work fine. The only minor problem is that I 
can't use the compilation speed of dmd during development because 
it is unable to link against my gtkd (compiled by an old LDC 
version) - not sure wether that is related.


More information about the digitalmars-d-ldc mailing list