digitalmars.D.bugs - [Issue 10927] New: Power of complex number causes an internal error
- d-bugmail puremagic.com (31/31) Aug 30 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10927
- d-bugmail puremagic.com (16/16) Aug 30 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10927
http://d.puremagic.com/issues/show_bug.cgi?id=10927
Summary: Power of complex number causes an internal error
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: ttanjo gmail.com
The following code causes an internal error in dmd v2.064-devel-2d0de85 on
Linux 64bit.
---
void main()
{
auto a = (1+2i)^^3;
}
---
Output:
$ rdmd error.d
1.00000
cdouble 0x1bfe8e0
cdouble 0x1bfe8e0
ty = 29, tym = 19
Internal error: e2ir.c 1424
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 30 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10927
Built-in complex numbers are deprecated; instead, use std.complex:
----
import std.complex;
import std.stdio;
void main()
{
writeln(complex(1,2)^^3); // prints -11-2i
}
----
I'll leave this bug open, though, since an ICE is a problem even if it's caused
by deprecated features.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 30 2013








d-bugmail puremagic.com