Bug 8376 – 64 bit codegen bug involving dynamically indexed static array and continue statement

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-10T20:19:00Z
Last change time
2015-06-09T05:12:00Z
Keywords
wrong-code
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-07-10T20:19:02Z
DMD 2.059 void main() { int i = 0; int[2] a; a[1]=1; while(!a[0]){ if(a[i]) continue; a[i] = 1; } } The code terminates with -m32 and enters an infinite loop with -m64. No other flags are necessary to reproduce.
Comment #1 by maxim — 2012-11-09T07:05:57Z
(In reply to comment #0) > DMD 2.059 > void main() { > int i = 0; > int[2] a; > a[1]=1; > while(!a[0]){ > if(a[i]) continue; > a[i] = 1; > } > } > > The code terminates with -m32 and enters an infinite loop with -m64. > No other flags are necessary to reproduce. In windows with -m64 dmd 2.060 produces Internal error: ..\ztc\cgobj.c 1479
Comment #2 by github-bugzilla — 2012-11-09T14:32:16Z
Comment #3 by bugzilla — 2012-11-09T14:32:59Z
I could not reproduce it with the current build, but I added it to the test suite anyway,
Comment #4 by verylonglogin.reg — 2012-11-10T21:47:02Z
Comment #5 by bugzilla — 2012-11-11T00:38:22Z