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


Zack Weinberg wrote:

You want to get rid of a test case that found a regression instead of
enticing someone to fix the compiler?



No, I want to get rid of a test case that fails to test anything
meaningful.


Let me reiterate that: it does not test anything meaningful. It
currently passes or fails depending on details of the platform ABI.
Worse, the compiler is within its rights to extend the lifetimes of
the temporaries because it notices that their addresses have been
taken. In fact, I expect Ken Zadeck's better alias analysis will have that effect.


Why do you expect that? Independently of whether or not their addresses have been taken, the language says these temporaries go away at a particular point. If the compiler extends their lifetimes unnecessarily because it thinks that pointers to them might survive, that's an unnecessary pessimization -- unless it has some other good reason for doing that.

I agree that this an ugly mechanism for testing for this optimization, and that some kind of stack-frame dumping might be better. On the other hand, we don't have a way of doing that at present. And this test does test for an optimization that we want to do, in general.

I don't see XPASSes as nearly so problematic as FAILs because if you see XPASSes you don't need to worry that you broke something; at worst, you accidentally fixed something. I don't see a way to hush the XFAIL using dg's target-selector mechanism, unfortunately.

--
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]