digitalmars.D.bugs - [Issue 1332] New: Internal error: ../ztc/cod4.c 357
- d-bugmail puremagic.com (40/40) Jul 11 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1332
- d-bugmail puremagic.com (9/9) Jul 30 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1332
http://d.puremagic.com/issues/show_bug.cgi?id=1332 Summary: Internal error: ../ztc/cod4.c 357 Product: D Version: 1.018 Platform: PC OS/Version: Linux Status: NEW Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: fvbommel wxs.nl ===== urxae urxae:~/tmp$ dmd test.d -c -g urxae urxae:~/tmp$ dmd test.d -c -gc urxae urxae:~/tmp$ dmd test.d -c -O urxae urxae:~/tmp$ dmd test.d -c -g -O Internal error: ../ztc/cod4.c 357 urxae urxae:~/tmp$ dmd test.d -c -gc -O Internal error: ../ztc/cod4.c 357 ==== As you can see, both (-g or -gc) and -O must be specified for the error to occur. The source: --- void recurse(inout int i) { int j = i; recurse(j); } --- The argument must be inout, and the argument to the recursive invocation must depend on the value of the original argument. If 'j' is initialized to '0', 'i*0' or similar it compiles fine. If it's initialized to 'i', 'i+1', etc. it errors out. If the parameter type is a struct (or a pointer to one) and the recursive invocation uses a value derived from a field as parameter it also errors out. (e.g. 'Node* n'/'n.next' or 'Node n'/'*n.next' as formal parameter/argument pair) --
Jul 11 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1332 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla digitalmars.com 2007-07-30 15:50 ------- Fixed DMD 1.019 and 2.003 --
Jul 30 2007