www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Tried release build got ICE, does anyone have a clue what might cause

reply Random D user <no email.com> writes:
So I tried to build my project in release for the first time in a 
long while. It takes like 25x longer to compile and finally the 
compiler crashes. It seems to go away if I disable the optimizer.
I get:

tym = x1d
Internal error: backend\cgxmm.c 547

Does anyone have a clue what might trigger this?
I'm asking because my project has grown a bit and I don't really 
have any good way of isolating this.

I'm using dmd 2.068.1 and msvc x64 target.
Sep 18 2015
next sibling parent reply ponce <contact gam3sfrommars.fr> writes:
On Friday, 18 September 2015 at 22:54:43 UTC, Random D user wrote:
 So I tried to build my project in release for the first time in 
 a long while. It takes like 25x longer to compile and finally 
 the compiler crashes. It seems to go away if I disable the 
 optimizer.
 I get:

 tym = x1d
 Internal error: backend\cgxmm.c 547

 Does anyone have a clue what might trigger this?
 I'm asking because my project has grown a bit and I don't 
 really have any good way of isolating this.

 I'm using dmd 2.068.1 and msvc x64 target.
As a backend ICE is is very important that you report this. To workaround, try disabling inlining or -O selectively.
Sep 19 2015
parent reply Random D user <no email.com> writes:
On Saturday, 19 September 2015 at 07:25:58 UTC, ponce wrote:
 On Friday, 18 September 2015 at 22:54:43 UTC, Random D user 
 wrote:
 So I tried to build my project in release for the first time 
 in a long while. It takes like 25x longer to compile and 
 finally the compiler crashes. It seems to go away if I disable 
 the optimizer.
 I get:

 tym = x1d
 Internal error: backend\cgxmm.c 547

 Does anyone have a clue what might trigger this?
 I'm asking because my project has grown a bit and I don't 
 really have any good way of isolating this.

 I'm using dmd 2.068.1 and msvc x64 target.
As a backend ICE is is very important that you report this. To workaround, try disabling inlining or -O selectively.
Thanks for the tips. I guess I should register an account (which I hate (already too many one off accounts)), since I already have like 3 bugs gathering dust in the corner. Just hit another one (this time in debug): Assertion failure: 'type->ty != Tstruct || ((TypeStruct *)type)->sym == this' on line 957 in file 'struct.c' Ugh... It really seems like D starts to break down once your code grows beyond toy program size. A bit frustrating...
Sep 19 2015
next sibling parent reply Random D user <no email.com> writes:
On Saturday, 19 September 2015 at 21:48:25 UTC, Random D user 
wrote:
 Assertion failure: 'type->ty != Tstruct || ((TypeStruct 
 *)type)->sym == this' on line 957 in file 'struct.c'
Ok managed to reduce this one to my own copy paste bug. This is invalid code, but compiler shouldn't crash... I'm posting this here for reference (I will file a bug later): class Gui { enum MouseButton { Left = 0, Right }; private: struct ClickPair { MouseButton button = MouseButton.Left; }; struct ClickPair // Second struct ClickPair with the enum above --> Assertion failure: 'type->ty != Tstruct || ((TypeStruct*)type)->sym == this' on line 957 in file 'struct.c' { MouseButton button = MouseButton.Left; }; };
Sep 19 2015
parent anonymous <anonymous example.com> writes:
On Sunday 20 September 2015 00:09, Random D user wrote:

 class Gui
 {
      enum MouseButton { Left = 0, Right };
 
 private:
 
      struct ClickPair
      {
 	    MouseButton button = MouseButton.Left;
      };
 
      struct ClickPair  // Second struct ClickPair with the enum 
 above --> Assertion failure: 'type->ty != Tstruct || 
 ((TypeStruct*)type)->sym == this' on line 957 in file 'struct.c'
      {
 	    MouseButton button = MouseButton.Left;
      };
 };
Off topic: You don't need semicolons after struct/class declarations in D.
Sep 19 2015
prev sibling parent Kagamin <spam here.lot> writes:
On Friday, 18 September 2015 at 22:54:43 UTC, Random D user wrote:
 I get:

 tym = x1d
 Internal error: backend\cgxmm.c 547

 Does anyone have a clue what might trigger this?
https://issues.dlang.org/show_bug.cgi?id=7951 https://issues.dlang.org/show_bug.cgi?id=12377 On Saturday, 19 September 2015 at 21:48:25 UTC, Random D user wrote:
 Assertion failure: 'type->ty != Tstruct || ((TypeStruct 
 *)type)->sym == this' on line 957 in file 'struct.c'

 Ugh...
 It really seems like D starts to break down once your code 
 grows beyond toy program size. A bit frustrating...
https://issues.dlang.org/show_bug.cgi?id=15092 https://issues.dlang.org/show_bug.cgi?id=11260
Sep 21 2015
prev sibling parent John Colvin <john.loughran.colvin gmail.com> writes:
On Friday, 18 September 2015 at 22:54:43 UTC, Random D user wrote:
 So I tried to build my project in release for the first time in 
 a long while. It takes like 25x longer to compile and finally 
 the compiler crashes. It seems to go away if I disable the 
 optimizer.
 I get:

 tym = x1d
 Internal error: backend\cgxmm.c 547

 Does anyone have a clue what might trigger this?
 I'm asking because my project has grown a bit and I don't 
 really have any good way of isolating this.

 I'm using dmd 2.068.1 and msvc x64 target.
Dustmite is really great for reducing this sort of problem
Sep 19 2015