www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1398] New: GDC doesn't generate correct code

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

           Summary: GDC doesn't generate correct code
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: mariusmuja gmail.com


Latest SVN version of GDC (r137) doesn't generate the correct code for the
following program:

class B
{
        private A[] ab;
}


class A
{
        private A[] aa;

        void bar()
        {
                aa = new A[10];
                assert(aa.length == 10);
        }
}

void main()
{
        A a = new A;
        a.bar();
}

For the above program not code is generated for the line aa = new A[10]; and
when ran the program terminated with an assertion failure which is obviously
incorrect. I get this behavior when I use gcc-4.1.2 from Gentoo with the
default gcc patches included in the gcc-4.1.2 ebuild. When I manually compile
GDC (r137) with gcc-4.1.2 without the other patches I get the following
compiler crash:

test.d: In member function âbarâ:
test.d:15: internal compiler error: in gimplify_expr, at gimplify.c:4680
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 
Aug 03 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1398


dvdfrdmn users.sf.net changed:

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




------- Comment #1 from dvdfrdmn users.sf.net  2007-08-05 12:22 -------
Fixed svn r138


-- 
Aug 05 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1398





------- Comment #2 from thomas-dloop kuehne.cn  2008-02-25 05:05 -------
Added to DStress as
http://dstress.kuehne.cn/run/a/array_initialization_34_A.d
http://dstress.kuehne.cn/run/a/array_initialization_34_B.d
http://dstress.kuehne.cn/run/a/array_initialization_34_C.d
http://dstress.kuehne.cn/run/a/array_initialization_34_D.d
http://dstress.kuehne.cn/run/a/array_initialization_34_E.d


-- 
Feb 25 2008