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
On Thu, Mar 13, 2008 at 4:02 PM, Janis Johnson <janis187@us.ibm.com> wrote:
>
> 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*.
>
Like this? OK to install if pass?
Thanks.
H.J.
2008-03-13 H.J. Lu <hongjiu.lu@intel.com>
PR testsuite/35558
* g++.dg/tls/static-1a.cc: Move dg-additional-sources after
dg-require-effective-target.
--- gcc/testsuite/g++.dg/tls/static-1a.cc.run 2006-11-18 06:24:22.000000000 -0800
+++ gcc/testsuite/g++.dg/tls/static-1a.cc 2008-03-13 16:19:38.000000000 -0700
@@ -1,7 +1,7 @@
// { dg-do run }
// { dg-options "-O2" }
-// { dg-additional-sources "static-1a.cc" }
// { dg-require-effective-target tls_runtime }
+// { dg-additional-sources "static-1a.cc" }
struct A
{