[Issue 7932] Corrupted argument inside out contract for protected methods when compiling with -O in x86_64
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 17 22:36:30 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7932
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-04-17 22:37:23 PDT ---
Adding assert(this); at the start of the body of f() makes the bug disappear.
I think this is why 'protected' is required; if it is public, the assert(this)
is automatically added.
Comparing the generated code for the three cases
(a) -O, fails
(b) without -O, passes
(c) -O + assert(this), passes
I can't see any obvious explanation. case (a) has the f() body of case (b), and
the main() body of case (c).
--
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