This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PING][PATCH, GCC/ARM] Only test tls-disable-literal-pool.c if target supports native TLS
- From: Prakhar Bahuguna <prakhar dot bahuguna at arm dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <nd at arm dot com>, <Richard dot Earnshaw at arm dot com>, <Ramana dot Radhakrishnan at arm dot com>, <Kyrylo dot Tkachov at arm dot com>
- Date: Fri, 19 May 2017 13:29:58 +0100
- Subject: [PING][PATCH, GCC/ARM] Only test tls-disable-literal-pool.c if target supports native TLS
- Authentication-results: sourceware.org; auth=none
- Authentication-results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 11/05/2017 14:54:37, Prakhar Bahuguna wrote:
> tls-disable-literal-pool.c should only be run if the toolchain and target
> support native thread-local storage rather than emulated TLS. This patch also
> improves the matching of the error message.
>
> testsuite/ChangeLog:
>
> 2017-05-11 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
>
> * gcc.target/arm/tls-disable-literal-pool.c: Change
> require-effective-target to tls_native.
> Move dg-error to return statement line and change to dg-message.
>
> Testing done: Regression testing for ARMv7-M with a TLS-enabled toolchain and a
> TLS-disabled toolchain.
>
> Okay for stage1?
>
> --
>
> Prakhar Bahuguna
> From 84837978d480a1abcebe7b4d2ac21af0eb6645b4 Mon Sep 17 00:00:00 2001
> From: Prakhar Bahuguna <prakhar.bahuguna@arm.com>
> Date: Thu, 11 May 2017 13:24:39 +0100
> Subject: [PATCH] Only test tls-disable-literal-pool.c if target supports
> native TLS
>
> This test should only be run if the toolchain and target support native
> thread-local storage rather than emulated TLS.
> ---
> gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c b/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c
> index fe14a6b132c..283201fdd97 100644
> --- a/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c
> +++ b/gcc/testsuite/gcc.target/arm/tls-disable-literal-pool.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-require-effective-target tls } */
> +/* { dg-require-effective-target tls_native } */
> /* { dg-require-effective-target arm_cortex_m } */
> /* { dg-require-effective-target arm_thumb2_ok } */
> /* { dg-options "-mslow-flash-data" } */
> @@ -9,7 +9,6 @@ __thread int x = 0;
> int
> bar ()
> {
> - return x;
> + return x; /* { dg-message "sorry, unimplemented: accessing thread-local storage is not currently supported with -mpure-code or -mslow-flash-data" } */
> }
>
> -/* { dg-error "accessing thread-local storage is not currently supported with -mpure-code or -mslow-flash-data" "" { target *-*-* } 12 } */
> --
> 2.11.0
>
Ping.
--
Prakhar Bahuguna