[x86,testsuite] Two tests that need to be native TLS?

Message ID 3E4CAD78-B9ED-422B-AED0-2D880C4D30D3@sandoe.co.uk
State New
Headers show
Series
  • [x86,testsuite] Two tests that need to be native TLS?
Related show

Commit Message

Iain Sandoe May 24, 2019, 7:42 a.m.
Hi Uros,

The following two tests fail on Darwin, which is an emulated TLS target.
ISTM that the tests really required native support, so that the right fix
is to require that. (I can skip them for Darwin, if this isn’t the right solution).

OK?

thanks
Iain

gcc/testsuite/

	* gcc.target/i386/pr86257.c: Require native TLS support.
	* gcc.target/i386/stack-prot-sym.c: Likewise.

Comments

Uros Bizjak May 30, 2019, 8:28 a.m. | #1
On Fri, May 24, 2019 at 9:43 AM Iain Sandoe <iain@sandoe.co.uk> wrote:
>

> Hi Uros,

>

> The following two tests fail on Darwin, which is an emulated TLS target.

> ISTM that the tests really required native support, so that the right fix

> is to require that. (I can skip them for Darwin, if this isn’t the right solution).


The test looks at the output of tls_global_dynamic_64_<mode> pattern,
which is only used with native tls.

> OK?


OK.

Thanks,
Uros.

>

> thanks

> Iain

>

> gcc/testsuite/

>

>         * gcc.target/i386/pr86257.c: Require native TLS support.

>         * gcc.target/i386/stack-prot-sym.c: Likewise.

>

> diff --git a/gcc/testsuite/gcc.target/i386/pr86257.c b/gcc/testsuite/gcc.target/i386/pr86257.c

> index 07fbba9..bc758c2 100644

> --- a/gcc/testsuite/gcc.target/i386/pr86257.c

> +++ b/gcc/testsuite/gcc.target/i386/pr86257.c

> @@ -1,6 +1,6 @@

>  /* { dg-require-effective-target lp64 } */

>  /* { dg-require-effective-target fpic } */

> -/* { dg-require-effective-target tls } */

> +/* { dg-require-effective-target tls_native } */

>  /* { dg-options "-g -fPIC -mtls-dialect=gnu" } */

>

>  __thread int i;

> diff --git a/gcc/testsuite/gcc.target/i386/stack-prot-sym.c b/gcc/testsuite/gcc.target/i386/stack-prot-sym.c

> index 7f63424..dcd7cbd 100644

> --- a/gcc/testsuite/gcc.target/i386/stack-prot-sym.c

> +++ b/gcc/testsuite/gcc.target/i386/stack-prot-sym.c

> @@ -1,4 +1,5 @@

>  /* { dg-do compile } */

> +/* { dg-require-effective-target tls_native } */

>  /* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=tls -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=my_guard" } */

>

>  void f(void) { }

>

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr86257.c b/gcc/testsuite/gcc.target/i386/pr86257.c
index 07fbba9..bc758c2 100644
--- a/gcc/testsuite/gcc.target/i386/pr86257.c
+++ b/gcc/testsuite/gcc.target/i386/pr86257.c
@@ -1,6 +1,6 @@ 
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target fpic } */
-/* { dg-require-effective-target tls } */
+/* { dg-require-effective-target tls_native } */
 /* { dg-options "-g -fPIC -mtls-dialect=gnu" } */
 
 __thread int i;
diff --git a/gcc/testsuite/gcc.target/i386/stack-prot-sym.c b/gcc/testsuite/gcc.target/i386/stack-prot-sym.c
index 7f63424..dcd7cbd 100644
--- a/gcc/testsuite/gcc.target/i386/stack-prot-sym.c
+++ b/gcc/testsuite/gcc.target/i386/stack-prot-sym.c
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-effective-target tls_native } */
 /* { dg-options "-O2 -fstack-protector-all -mstack-protector-guard=tls -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=my_guard" } */
 
 void f(void) { }