digitalmars.D.bugs - [Issue 7028] New: Fails to save FPU regs when executing finally block
- d-bugmail puremagic.com (38/38) Nov 29 2011 http://d.puremagic.com/issues/show_bug.cgi?id=7028
- d-bugmail puremagic.com (12/12) Nov 29 2011 http://d.puremagic.com/issues/show_bug.cgi?id=7028
http://d.puremagic.com/issues/show_bug.cgi?id=7028
Summary: Fails to save FPU regs when executing finally block
Product: D
Version: D1 & D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: bugzilla digitalmars.com
02:24:30 PST ---
alias real T;
T readMessageBegin() { return 3.0; }
T bar() { return 8.0; }
T foo() {
readMessageBegin();
scope (exit) readMessageEnd();
T result = bar();
return result;
}
void main()
{
if (foo() != 8.0) // should be the result of bar()
assert(0);
}
T readMessageEnd() {
static T d;
d = 4.0;
// necessary to use all FPU registers
d =
(((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d)))))/((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d)))))+((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d)))))/((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))))*(((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d)))))/((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d)))))+((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d)))))/((((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))+(((d-(2*d))+(d-(2*d)))*((d-(2*d))+(d-(2*d))))));
return 4.0;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 29 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7028
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
11:56:17 PST ---
https://github.com/D-Programming-Language/dmd/commit/202adf38b9eab20afbb1dda8d0b7b8ecd3496180
https://github.com/D-Programming-Language/dmd/commit/097a02ac09221b9f690edee39b0b1a22f1b6f4f9
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 29 2011








d-bugmail puremagic.com