This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR testsuite/35558: Untested g++.dg/tls/static-1a.cc
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 13 Mar 2008 16:02:21 -0700
- Subject: Re: PATCH: PR testsuite/35558: Untested g++.dg/tls/static-1a.cc
- References: <6dc9ffc80803131233u7808496dt1695ce1d16fdfb81@mail.gmail.com>
- Reply-to: janis187 at us dot ibm dot com
On Thu, 2008-03-13 at 12:33 -0700, H.J. Lu wrote:
> Hi,
>
> dg-additional-files is called when compiling source code if there is
>
> { dg-additional-sources "static-1a.cc" }
>
> check_runtime_nocache is called when there is
>
> { dg-require-effective-target tls_runtime }
>
> When both are in the same test source file, we will do run time
> check with additional sources, which don't exist in the same
> directory where the run time check source is, and the run time
> check will fail. However, those additional sources aren't needed
> for run time check.
>
> This patch avoids adding those additional sources for run-time
> check. OK to install if pass on Linux/Intel64?
No. The documentation of test directives in sourcebuild.texi says:
@item @{ dg-require-@var{support} args @}
Skip the test if the target does not provide the required support;
see @file{gcc-dg.exp} in the GCC testsuite for the actual directives.
These directives must appear after any @code{dg-do} directive in the test
and before any @code{dg-additional-sources} directive.
Fix the test by putting dg-additional-sources after dg-require*.
Janis