www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 164] New: Internal compiler error with foreach

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=164

           Summary: Internal compiler error with foreach
           Product: GDC
           Version: 0.18
          Platform: Macintosh
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: csantander619 gmail.com


//----------------
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.


-- 
May 30 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=164






I cannot reproduce this.  Which version of GCC did you build against?  Was it a
clean build?


-- 
Jun 03 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=164






I didn't see this was PowerPC Linux.  Can reproduce now.


-- 
Jun 03 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=164


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




-- 
Jun 03 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=164


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED





Fixed in SF subversion.  For incremental builds, re-apply patch-gcc-4.0.x.


-- 
Jun 03 2006