digitalmars.D.bugs - [Issue 11201] New: ICE: -inline stops compilation
- d-bugmail puremagic.com (35/35) Oct 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11201
- d-bugmail puremagic.com (6/6) Oct 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11201
- d-bugmail puremagic.com (17/17) Oct 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11201
http://d.puremagic.com/issues/show_bug.cgi?id=11201 Summary: ICE: -inline stops compilation Product: D Version: D2 Platform: x86_64 OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: daniel350 bigpond.com struct Foo { float a, b; Foo opUnary(string op)() const { return this; } Foo opBinary(string op)(float) { return this; } } auto f1(T)(T a) { return 1; } auto f2(T)(T a) { return a * f1(a); } void main() {} unittest { auto a = Foo(0, 1); assert(f2(-a) == a); } I've reduce the code as much I thought possible, removal of anything else stops the ICE occuring. When compiling the above code, with the following command line arguments: `dmd -unittest -inline test.d` Displays `Internal error: backend/symbol.c 1036` Confirmed with Arch Linux and OSX. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11201 Confirmed on Git HEAD (511b24a457) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11201 Further reduced: struct Foo { float a, b; Foo opUnary(string op)() const { return this; } } auto f1(T)(T a) { return a; } auto f2(T)(T a) { return f1(a); } void main() {} unittest { auto a = Foo(0, 1); assert(f2(-a) == a); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2013