[Issue 1398] New: GDC doesn't generate correct code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 3 20:16:15 PDT 2007
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 at users.sf.net
ReportedBy: mariusmuja at 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.
--
More information about the D.gnu
mailing list