[Issue 10883] New: [ICE] Internal error: ../ztc/cod4.c 358 when compiling with -inline
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 24 09:33:48 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10883
Summary: [ICE] Internal error: ../ztc/cod4.c 358 when compiling
with -inline
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: doob at me.com
--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-08-24 09:33:47 PDT ---
I get "Internal error: ../ztc/cod4.c" when compiling the following code with
-inline on Mac OS X:
U getValueOfField (T, U, string field) (T t)
{
foreach (i, dummy ; typeof(T.tupleof))
return t.tupleof[i];
assert(0, "Should not happen");
}
class Foo
{
auto bar = "foo";
}
void main ()
{
auto a = getValueOfField!(Foo, string, "bar")(new Foo);
}
If I do any of the following the error disappears:
* Remove the assignment to "a"
* Remove the foreach loop
* Add a return statement after the assert
* Compile without -inline
--
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