digitalmars.D.learn - Assertion failure: '!cases' on line 2620 in file 'statement.c'
- %u (2/2) Jan 12 2011 Assertion failure: '!cases' on line 2620 in file 'statement.c'
- %u (2/2) Jan 12 2011 Should I post it as a bug, even though I have no code to accompany it?
- Simen kjaeraas (5/8) Jan 12 2011 Please do post it, yes. As for searching, if you are willing to share
- Don (4/6) Jan 12 2011 Can you post the entire source code?
- %u (4/10) Jan 12 2011 I crashed it again :)
- Don (15/27) Jan 13 2011 It's in a switch statement somewhere.
- %u (53/66) Jan 13 2011 I've got something better.. a minimal version :)
- Don (11/88) Jan 13 2011 Awesome!
- Andrej Mitrovic (4/8) Jan 13 2011 Ugh, I just realized I was using DMD in debug mode by mistake for the
- %u (3/5) Jan 13 2011 Had to learn that once anyway :)
-
Don
(4/10)
Jan 14 2011
Assertion failure: '!cases' on line 2620 in file 'statement.c' This is what I got from trying to build my project(30+ modules) without bud.
Jan 12 2011
Should I post it as a bug, even though I have no code to accompany it? I have no clue as to where to start my directed search for a minimal case.
Jan 12 2011
%u <e ee.com> wrote:Should I post it as a bug, even though I have no code to accompany it? I have no clue as to where to start my directed search for a minimal case.Please do post it, yes. As for searching, if you are willing to share the code , others may be willing to do the search. -- Simen
Jan 12 2011
%u wrote:Should I post it as a bug, even though I have no code to accompany it? I have no clue as to where to start my directed search for a minimal case.Can you post the entire source code? It's important that it be reproducible. It doesn't need to be minimal - someone else can reduce it.
Jan 12 2011
== Quote from Don (nospam nospam.com)'s article%u wrote:I crashed it again :) Sorry, can't share the code.. I don't really have any time atm, look at it again tomorrow.Should I post it as a bug, even though I have no code to accompany it? I have no clue as to where to start my directed search for a minimal case.Can you post the entire source code? It's important that it be reproducible. It doesn't need to be minimal - someone else can reduce it.
Jan 12 2011
%u wrote:== Quote from Don (nospam nospam.com)'s articleBummer.%u wrote:I crashed it again :) Sorry, can't share the code..Should I post it as a bug, even though I have no code to accompany it? I have no clue as to where to start my directed search for a minimal case.Can you post the entire source code? It's important that it be reproducible. It doesn't need to be minimal - someone else can reduce it.I don't really have any time atm, look at it again tomorrow.It's in a switch statement somewhere. It sounds as though this is a bug which involves multiple files, so it'll be difficult to reduce it. If you're able to compile DMD, change this line in statement.c line 2620: Statement *SwitchStatement::semantic(Scope *sc) { //printf("SwitchStatement::semantic(%p)\n", this); tf = sc->tf; + if (cases) error("xxx"); assert(!cases); // ensure semantic() is only run once and then you'll get the line number where the error is. If you can provide the function which contains the switch statement, there's a chance I could reproduce it.
Jan 13 2011
== Quote from Don (nospam nospam.com)'s articleIt's in a switch statement somewhere. It sounds as though this is a bug which involves multiple files, so it'll be difficult to reduce it. If you're able to compile DMD, change this line in statement.c line 2620: Statement *SwitchStatement::semantic(Scope *sc) { //printf("SwitchStatement::semantic(%p)\n", this); tf = sc->tf; + if (cases) error("xxx"); assert(!cases); // ensure semantic() is only run once and then you'll get the line number where the error is.Yay for first time compiling dmd :)If you can provide the function which contains the switch statement, there's a chance I could reproduce it.I've got something better.. a minimal version :) Which even crashes through bud. ---- module main; enum E { A = 0 }; struct S{ int i; static S func( S s, E e ){ switch( e ) //<---------- here { default:return s; } } static const S s_def = { 1 }; //static const S A = func(s_def, E.A ); // forward reference error + crash //static const S[1] ARR = [ E.A : func(s_def, E.A )]; // error : xxx + crash } void main(){} ---- To test all this I switched from 1.065 to 1.066; just to make sure it hadn't been fixed already. And now my project won't compile any more even though bud+1.065 will happily do so.. bud+ 1.066 gives me the following (no crash though) Internal error: backend\cgobj.c 2424 What does that mean?
Jan 13 2011
%u wrote:== Quote from Don (nospam nospam.com)'s articleSorry you had to do that!It's in a switch statement somewhere. It sounds as though this is a bug which involves multiple files, so it'll be difficult to reduce it. If you're able to compile DMD, change this line in statement.c line 2620: Statement *SwitchStatement::semantic(Scope *sc) { //printf("SwitchStatement::semantic(%p)\n", this); tf = sc->tf; + if (cases) error("xxx"); assert(!cases); // ensure semantic() is only run once and then you'll get the line number where the error is.Yay for first time compiling dmd :)Awesome! I'll track this sucker down so it doesn't hit anyone else.If you can provide the function which contains the switch statement, there's a chance I could reproduce it.I've got something better.. a minimal version :) Which even crashes through bud.---- module main; enum E { A = 0 }; struct S{ int i; static S func( S s, E e ){ switch( e ) //<---------- here { default:return s; } } static const S s_def = { 1 }; //static const S A = func(s_def, E.A ); // forward reference error + crash //static const S[1] ARR = [ E.A : func(s_def, E.A )]; // error : xxx + crash } void main(){} ---- To test all this I switched from 1.065 to 1.066; just to make sure it hadn't been fixed already. And now my project won't compile any more even though bud+1.065 will happily do so.. bud+ 1.066 gives me the following (no crash though) Internal error: backend\cgobj.c 2424 What does that mean?The DMD makefile compiles in debug mode by default. It prints some useless 'fixups' junk. You need to compile with make -fwin32.mak release or make -flinux.mak release to make a release compiler. But, not important, you can go back to using an official compiler again. <g> The internal error means it's now crashing in the backend, rather than the frontend. Not an improvement!
Jan 13 2011
On 1/13/11, Don <nospam nospam.com> wrote:The DMD makefile compiles in debug mode by default. It prints some useless 'fixups' junk. You need to compile with make -fwin32.mak release or make -flinux.mak release to make a release compiler.Ugh, I just realized I was using DMD in debug mode by mistake for the last couple of weeks. Thanks for the info (I should have looked this up).
Jan 13 2011
== Quote from Don (nospam nospam.com)'s articleHad to learn that once anyway :) Maybe I'll even be able to take a stab at fixing bugs someday..Yay for first time compiling dmd :)Sorry you had to do that!
Jan 13 2011
%u wrote:== Quote from Don (nospam nospam.com)'s article<g> Added your bug as: http://d.puremagic.com/issues/show_bug.cgi?id=5453Had to learn that once anyway :) Maybe I'll even be able to take a stab at fixing bugs someday..Yay for first time compiling dmd :)Sorry you had to do that!
Jan 14 2011