www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Strange bug: dmd crash

reply Amaury Pouly <amaury.pouly gmail.com> writes:
Hi,
I'm not sure it's the right place to say it but I found a strange
configuration where dmd(on windows XP) crashes.
Here is the code:
[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;

If I compile with:
dmd test.d test2.d
Then it crashes.
Some important facts about this "bug":
-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 :)
I'm using dmd v0.177
Dec 31 2006
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Amaury Pouly" <amaury.pouly gmail.com> wrote in message 
news:en9dts$1qf0$1 digitaldaemon.com...
 Hi,
 I'm not sure it's the right place to say it but I found a strange
 configuration where dmd(on windows XP) crashes.
 Here is the code:
 [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;

 If I compile with:
 dmd test.d test2.d
 Then it crashes.
 Some important facts about this "bug":
 -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 :)
 I'm using dmd v0.177
First, try it with 0.178 and see if it goes away. If that doesn't fix it, try posting this on Bugzilla: http://d.puremagic.com/issues/ You might also try searching it to see if the bug has already been posted.
Dec 31 2006
parent pamaury <amaury.pouly gmail.com> writes:
== Extrait de l'article de « Jarrett Billingsley (kb3ctd2 yahoo.com) »
 "Amaury Pouly" <amaury.pouly gmail.com> wrote in message
 news:en9dts$1qf0$1 digitaldaemon.com...
 Hi,
 I'm not sure it's the right place to say it but I found a strange
 configuration where dmd(on windows XP) crashes.
 Here is the code:
 [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;

 If I compile with:
 dmd test.d test2.d
 Then it crashes.
 Some important facts about this "bug":
 -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 :)
 I'm using dmd v0.177
First, try it with 0.178 and see if it goes away. If that doesn't fix it, try posting this on Bugzilla: http://d.puremagic.com/issues/ You might also try searching it to see if the bug has already been posted.
Thanks for your answer but even with v0.178 it crashes. I've not found a similar issue on BugZilla but its quite difficult to describe easily this bug so I have perhaps missed it :( I will post it on BugZilla.
Dec 31 2006