This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++.old-deja/g++.mike/p7325.C - suspected bogus test case


Michael Matz wrote:

Hi Mark,

On Mon, 12 Jul 2004, Mark Mitchell wrote:



The probability for this is quite small.  If such machine happens to exist
the testcase can be XFAILed for it.  Equally unlikely are machines for
which not merging stack slots produces faster code, be it for smaller
stack frame, hence possibly shorter insn encoding, not to mention cache
effects.  Why do you use such constructed examples?



I'm uncomfortable with using this kind of black-box approach for testing
optimization capabilities.



black-box in the sort of testing in a way for which no guarantee is given by the language standard? Well, then call it testing of implementation defined behaviour (and we define it to reuse stack slots under well defined circumstances; as first iteration circumstance == {compiled with not -O0}). This testcase is testing a specific behaviour of the implementation, and I think it does so reliably (if it would work ;-) ). Namely that the this pointer doesn't change (by extension this means that stack slots were reused for this class, i.e. what we wanted).


If we all agree on a well-defined set of circumstances under which we want to do this optimization, and document that, then I certainly have no objection to having test cases that test for that functionality.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]