www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1911] New: Link error when creating array of typedefs with default initializer

reply d-bugmail puremagic.com writes:
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.


-- 
Mar 12 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1911




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: -------
Nov 03 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1911


Iain Buclaw <ibuclaw ubuntu.com> changed:

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



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: -------
Nov 03 2010