Bug 164 – Internal compiler error with foreach

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
PowerPC
OS
Linux
Creation time
2006-05-30T06:54:00Z
Last change time
2015-06-09T05:14:55Z
Keywords
ice-on-valid-code
Assigned to
dvdfrdmn
Creator
casantander1

Comments

Comment #0 by casantander1 — 2006-05-30T06:54:04Z
//---------------- class Baz { int opApply (int delegate(inout int) dg) { int i; return dg(i); } } class Foo { Baz baz; int foo (int delegate() dg) { foreach (b; baz) if (bar ()) if (dg ()) break; return 0; } bool bar () {} } //---------------- $ gdc -c -g test.d test.d: En la función ‘__foreachbody1’: test.d:16: error interno del compilador: Violación de segmento Por favor envíe un reporte completo de bichos, con el código preprocesado si es apropiado. Vea <URL:http://gcc.gnu.org/bugs.html> para más instrucciones.
Comment #1 by dvdfrdmn — 2006-06-03T08:51:46Z
I cannot reproduce this. Which version of GCC did you build against? Was it a clean build?
Comment #2 by dvdfrdmn — 2006-06-03T09:18:39Z
I didn't see this was PowerPC Linux. Can reproduce now.
Comment #3 by dvdfrdmn — 2006-06-03T14:07:50Z
Fixed in SF subversion. For incremental builds, re-apply patch-gcc-4.0.x.