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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 12 04:38:04 PDT 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 at users.sf.net
        ReportedBy: matti.niemenmaa+dbugzilla at 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.


-- 



More information about the D.gnu mailing list