Bug 6548 – [e2ir.c] Problem with ^^ vector op

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-08-24T03:04:00Z
Last change time
2011-09-26T09:48:51Z
Keywords
patch
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-08-24T03:04:49Z
void main() { auto _ = [1][] ^^ 2; } DMD 2.055beta output: [1][] ^^ 2 Internal error: e2ir.c 683
Comment #1 by ibuclaw — 2011-08-26T14:45:20Z
Ahh, looks like it is leaking PowExp::toElem - didn't notice this as I have it implemented in GDC. Best thing to immediately do is implement the missing methods as stubs (I was intending to move onto backend support and add constant folding/ctfe support for ^^ operations. :)
Comment #2 by ibuclaw — 2011-08-27T13:02:04Z
Can you see if you can break things in any way after this commit? https://github.com/D-Programming-Language/dmd/pull/344 Regards Iain
Comment #3 by bearophile_hugs — 2011-08-31T21:52:12Z
(In reply to comment #2) > Regards > Iain Thank you for your work.
Comment #4 by ibuclaw — 2011-09-07T13:17:21Z
https://github.com/D-Programming-Language/dmd/pull/344/files Finalised feature and added test cases.
Comment #5 by bearophile_hugs — 2011-09-26T04:28:19Z
(In reply to comment #2) > Can you see if you can break things in any way after this commit? Now this code doesn't crash DMD: void main() { auto _ = [1][] ^^ 2; } But this code doesn't work yet: import std.math; void main() { int[5] a, b; b[] = a[] ^^ 2; } It gives: ...\dmd2\src\phobos\std\math.d(58): Error: module math is in file 'core\stdc\math.d' which cannot be read
Comment #6 by bearophile_hugs — 2011-09-26T09:48:04Z
Sorry, my Phobos was badly set. Things work now.
Comment #7 by bearophile_hugs — 2011-09-26T09:48:51Z