[Issue 10682] [ICE](cgcod.c line 1561) with ^^ operator and ulong
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 6 07:08:49 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10682
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
CC| |yebblies at gmail.com
AssignedTo|nobody at puremagic.com |yebblies at gmail.com
Summary|[ICE](cgcod.c line 1561) |[ICE](cgcod.c line 1561)
|with ^^ operator |with ^^ operator and ulong
Severity|major |regression
--- Comment #5 from yebblies <yebblies at gmail.com> 2013-09-07 00:08:45 EST ---
A quick look shows that:
void main() {
ulong x = 1;
ulong y = 2 ^^ x;
}
Is expanded to:
ulong x = 1LU;
ulong y = 1LU << x * 1LU;
return 0;
while
void main() {
ulong x = 1LU;
ulong y = 1LU << x * 1LU;
}
is expanded to
ulong x = 1LU;
ulong y = 1LU << cast(int)(x * 1LU);
return 0;
And it seems the register allocator (or something) can't handle a ulong shift
amount. Usually, a cast to int is inserted during semantic on the ShlExp, but
as this one was created during optimize, it never happened.
https://github.com/D-Programming-Language/dmd/pull/2528
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list