|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D.gnu - [Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
http://d.puremagic.com/issues/show_bug.cgi?id=578 Summary: GDC evaluates rvalue of array assignment repeatedly Product: GDC Version: 0.19 Platform: PC OS/Version: All Status: NEW Severity: major Priority: P2 Component: glue layer AssignedTo: braddr puremagic.com ReportedBy: akaquinn hotmail.com In array assignments of a scalar into an array (ie emulating memset), the expression is evaluated repeatedly. It is NOT evaluated repeatedly in DMD. This error appears to exist in every version of GDC (0.19, latest 0.20 from SVN, latest trunk from SVN) Reproduction: Script started on Sun 19 Nov 2006 05:36:34 PM PST [gregor glapgor test]$ cat test.d extern (C) int printf(char *, ...); int main() { int[10] a; a[] = printf("Ha-HAH\n"); return 0; } [gregor glapgor test]$ gdc test.d [gregor glapgor test]$ ./a.out Ha-HAH Ha-HAH Ha-HAH Ha-HAH Ha-HAH Ha-HAH Ha-HAH Ha-HAH Ha-HAH Ha-HAH [gregor glapgor test]$ exit exit Script done on Sun 19 Nov 2006 05:36:42 PM PST -- Nov 19 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-11-20:http://d.puremagic.com/issues/show_bug.cgi?id=578 Nov 25 2006
http://d.puremagic.com/issues/show_bug.cgi?id=578 braddr puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|braddr puremagic.com |dvdfrdmn users.sf.net ------- Comment #2 from braddr puremagic.com 2006-11-25 15:08 ------- Mass reassignment of gdc bugs from me to David. -- Nov 25 2006
http://d.puremagic.com/issues/show_bug.cgi?id=578 dvdfrdmn users.sf.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Dec 16 2006
http://d.puremagic.com/issues/show_bug.cgi?id=578 dvdfrdmn users.sf.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #3 from dvdfrdmn users.sf.net 2006-12-16 21:23 ------- Fixed in GDC 0.20 -- Dec 16 2006
|