Summary: Associative array with enum key causes link problems
                    when compiled in multiple files
           Product: D
           Version: 2.040
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Russ Lewis <> 2010-02-04 
08:14:14 PST ---
DMD 2.040
Linux (Fedora) on x86

NOTE: I think that this is a likely dup of 3745.  However, I'm posting this new
defect because it is a new flavor of the problem, just in case the root causes
are somewhat different.

--file: foo.d--
import std.stdio;
import bar;

void main()
  foreach(e; ENUM_table.values)
    writef("%d", e);
  foreach(e; ENUM_table.keys)
    writef("%d", e);

--file: bar.d--
enum ENUM : uint {
  INVALID = 256

int[ENUM] ENUM_table;


dmd -c foo.d
dmd -c bar.d
gcc -m32 foo.o bar.o -L ~/d/2.0/dmd2/linux/lib -lphobos2 -lpthread -lm -o


foo.o: In function `_Dmain':
foo.d:(.text._Dmain+0x14): undefined reference to
foo.d:(.text._Dmain+0x70): undefined reference to
collect2: ld returned 1 exit status

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to