digitalmars.D.bugs - [Issue 2317] New: asm offsetof generates: Internal error: ../ztc/cod3.c 2651
- d-bugmail puremagic.com (49/49) Aug 27 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2317
- d-bugmail puremagic.com (7/7) Aug 28 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2317
- d-bugmail puremagic.com (4/4) Aug 28 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2317
- d-bugmail puremagic.com (9/9) Sep 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2317
http://d.puremagic.com/issues/show_bug.cgi?id=2317 Summary: asm offsetof generates: Internal error: ../ztc/cod3.c 2651 Product: D Version: 1.034 Platform: PC OS/Version: Linux Status: NEW Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: manuelk89 gmx.net // file main.d struct Foo { // Use one of these lines at a time //float x; // OK float x,y; // ERROR //float[0] x; // OK //float[1] x; // OK //float[2] x; // ERROR //float[3] x; // ERROR //int x; // OK //int x,y; // ERROR //int[2] x; // ERROR //char x; // OK //char x,y; // OK !! //char[2] x; // OK !! //dchar x,y; // ERROR //dchar[2] x; // ERROR } void bar(Foo f) { asm { // bug seems to arise whenever 'offsetof f' is used mov EAX, offsetof f; } } --------------- $ dmd main.d Internal error: ../ztc/cod3.c 2651 This error seems to arise whenever the struct has more than one "field" (either as real variable field or even as array), but interestingly it works for char. 'f' has to be a parameter, it compiles fine when declared as a global or local var. --
Aug 27 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2317 The error also arises in case of: char x,y,a,b,c; // ERROR real x; // ERROR That is, when Foo.sizeof > 4. --
Aug 28 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2317 Don't worry, I'll have that one fixed in the next update. --
Aug 28 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2317 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 1.035 and 2.019 --
Sep 02 2008