This is the mail archive of the gcc-patches@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: [PATCH] Fix PR optimization/6713 (testsuite failure)




--On Thursday, July 18, 2002 07:35:39 PM -0400 David Edelsohn <dje@watson.ibm.com> wrote:

Richard Henderson writes:
Richard> Oops.  Should work even without checking __GXX_WEAK__, no?

	The only example I find is

g++.other/instan1.C

explicitly instantiating such a template, but it also explicitly invokes
g++ with -fno-implicit-templates.

	In which form should I check in the patch:

1) with __GXX_WEAK__ test?
2) without __GXX_WEAK__ test?
3) without __GXX_WEAK__ test and with -fno-implicit-templates?
The idea motivating the libstdc++ decision was that the library tests
should test the library in the mode most likely to be used by the
user on the target system.

So, on systems without weak symbols, libstdc++ tests use explicit
instantiation -- that's what users on those systems do.  On the other
hand, on systems with weak symbols, the libstdc++ tests use implicit
instantiations -- that's what users on those systems usually do.

For the compiler tests, I think we should generally use the same
mechanism for a particular test, independent of the platform.

The point is not to test the library -- it's to test the compiler.  If
instantiation isn't the point of the test, but rather we are trying to
test some *other* aspect of the compiler, then we should probably use
explicit instantiation so that whether or not we are on a system with
weak symbols does not bias the test.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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