Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #270 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Array operations in a template in a different module result in linkage errors

Reported by: Deewiant Assigned to: lindquist
Priority: major Milestone:
Component: backend Version: hg tip
Keywords: Cc:

Description

a.d:

import b;

void main() { C!().f; }

b.d:

template C() {
	void f() {
		int[1] x;

		x[] += x[];
	}
}

Compiling either ldc a.d b.d or just ldc -c a.d:

a.d: Error: module a Global is external, but doesn't have external or dllimport or weak linkage!
%"int[]" (%"int[]", %"int[]")* @_D1b24_arraySliceSliceAddass_iFAiAiZAi
invalid linkage type for function declaration
%"int[]" (%"int[]", %"int[]")* @_D1b24_arraySliceSliceAddass_iFAiAiZAi
Broken module found, compilation terminated.

Change History

04/25/09 14:36:05 changed by Deewiant

D'oh, forgot to give versions: happens with both r1263 and r1227, on x86-64.

04/29/09 13:00:09 changed by lindquist

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in rev [1279]

Copyright © 2008, LDC Development Team.