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 testsuite/39790: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library


As commented by Hans-Peter Nilsson(hp@gcc.gnu.org) in bugzilla
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39790), we can just use
tls_runtime as the target instead of creating a new predicate that
does link-test.

I agree with it, and here is the new patch.

       PR testsuite/39790
       * lib/target-supports.exp (check_effective_target_tls): Remove
       comment of caching.
       (check_effective_target_tls_native): Likewise.
       (check_effective_target_tls_runtime): Likewise.
       * gcc.dg/tls/alias-1.c (dg-require-effective-target): Change target
       tls to tls_runtime.
       * gcc.dg/tls/opt-2.c: Add dg-require-effective-target tls_runtime.

Is it ok?

Thanks,
Jing
Index: testsuite/gcc.dg/tls/alias-1.c
===================================================================
--- testsuite/gcc.dg/tls/alias-1.c	(revision 146221)
+++ testsuite/gcc.dg/tls/alias-1.c	(working copy)
@@ -1,7 +1,7 @@
 /* { dg-do link } */
 /* { dg-require-alias "" } */
 /* { dg-require-visibility "" } */
-/* { dg-require-effective-target tls } */
+/* { dg-require-effective-target tls_runtime } */
 /* Test that encode_section_info handles the change from externally
    defined to locally defined (via hidden).   Extracted from glibc.  */
 
Index: testsuite/gcc.dg/tls/opt-2.c
===================================================================
--- testsuite/gcc.dg/tls/opt-2.c	(revision 146221)
+++ testsuite/gcc.dg/tls/opt-2.c	(working copy)
@@ -6,6 +6,7 @@
 /* { dg-options "-O2 -ftls-model=initial-exec" } */
 /* { dg-options "-O2 -ftls-model=initial-exec -march=i686" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 /* { dg-require-effective-target tls_native } */
+/* { dg-require-effective-target tls_runtime  } */
 
 __thread int thr;
 
Index: testsuite/lib/target-supports.exp
===================================================================
--- testsuite/lib/target-supports.exp	(revision 146221)
+++ testsuite/lib/target-supports.exp	(working copy)
@@ -544,8 +544,6 @@ proc check_effective_target_pcc_bitfield
 }
 
 # Return 1 if thread local storage (TLS) is supported, 0 otherwise.
-#
-# This won't change for different subtargets so cache the result.
 
 proc check_effective_target_tls {} {
     return [check_no_compiler_messages tls assembly {
@@ -556,8 +554,6 @@ proc check_effective_target_tls {} {
 }
 
 # Return 1 if *native* thread local storage (TLS) is supported, 0 otherwise.
-#
-# This won't change for different subtargets so cache the result.
 
 proc check_effective_target_tls_native {} {
     # VxWorks uses emulated TLS machinery, but with non-standard helper
@@ -575,8 +571,6 @@ proc check_effective_target_tls_native {
 }
 
 # Return 1 if TLS executables can run correctly, 0 otherwise.
-#
-# This won't change for different subtargets so cache the result.
 
 proc check_effective_target_tls_runtime {} {
     return [check_runtime tls_runtime {

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