Thread overview
[Issue 782] New: Dmd crash with template class, alias, inheritance and severals files
Jan 01, 2007
d-bugmail
Jan 01, 2007
d-bugmail
Jan 01, 2007
d-bugmail
Feb 03, 2007
d-bugmail
January 01, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=782

           Summary: Dmd crash with template class, alias, inheritance and
                    severals files
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: amaury.pouly@gmail.com


Here is the code:(2 files)
[test.d]
import test2;

abstract class UpperClass
{
}

[test2.d]
import test;

abstract class MiddleClass : UpperClass
{
}

class Generic(T) : MiddleClass
{
 T m_value=0;
}

alias Generic!(byte) GenericByte;
[/test2.d]
If I compile with:
dmd test.d test2.d
Then it crashes.
Some important facts about this issue:
-if everything is coded is one file, dmd compiles well
-if I import test2 AFTER the declaration of UpperClass and NOT BEFORE,
  dmd compiles well
-if I remove "alias Generic!(byte) GenericByte;", dmd compiles well
-if I change "T m_value=0;" to "T m_value;", dmd compiles well
-if MiddleClass does not inherite from UpperClass or Generic inherite from
MiddleClass, dmd compiles well
When I say it compiles well of course, I mean without crashing


-- 

January 01, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=782





------- Comment #1 from bugzilla@digitalmars.com  2007-01-01 00:25 -------
For now, I can reduce this to a compile time forward reference error rather than a seg fault.


-- 

January 01, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=782





------- Comment #2 from thomas-dloop@kuehne.cn  2007-01-01 10:35 -------
Added to DStress as http://dstress.kuehne.cn/compile/o/odd_bug_12_A.d http://dstress.kuehne.cn/compile/o/odd_bug_12_B.d


-- 

February 03, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=782


bugzilla@digitalmars.com changed:

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




------- Comment #3 from bugzilla@digitalmars.com  2007-02-03 00:54 -------
Works fine with DMD 1.004.


--