Thread overview
[Issue 1911] New: Link error when creating array of typedefs with default initializer
Mar 12, 2008
d-bugmail
Nov 03, 2010
Iain Buclaw
Nov 03, 2010
Iain Buclaw
March 12, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1911

           Summary: Link error when creating array of typedefs with default
                    initializer
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: link-failure
          Severity: major
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn@users.sf.net
        ReportedBy: matti.niemenmaa+dbugzilla@iki.fi


In file a.d:
--
typedef int foo = 1;
--
In file b.d:
--
import a;
void main() { foo[] x = new foo[1]; }
--

Compiling with "gdmd ./b.d ./a.d":

b.o:(.data._D16TypeInfo_T1a3foo6__initZ[_D16TypeInfo_T1a3foo6__initZ]+0x18):
undefined reference to `___s.904'
collect2: ld returned 1 exit status

Compiling in the order "gdmd ./a.d ./b.d" works, however.

This only happens with GDC (latest trunk) and not DMD.

I marked this as 'major' since it's tedious to find out which files the problem is in, so that one can link in the correct order.


-- 

November 03, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1911



--- Comment #1 from Iain Buclaw <ibuclaw@ubuntu.com> 2010-11-03 14:44:14 PDT ---
FYI, this issue is fixed, I'll push it into the tip later.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 03, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1911


Iain Buclaw <ibuclaw@ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Iain Buclaw <ibuclaw@ubuntu.com> 2010-11-03 16:21:06 PDT ---
Fixed in changeset 336

http://bitbucket.org/goshawk/gdc/changeset/8667626321e7

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------