diff mbox

[testsuite] : Do not cache check_effective_target_sync_{long_long,int_128} results

Message ID CAFULd4YLkYkXaJoeFTsTYdVCsXF3WLuAHUQJm4kn2XcQo_=ETg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Nov. 7, 2011, 1:08 p.m. UTC
Hello!

Availability of long long and int_128 sync instructions can vary on
x86, due to -m32, so don't cache the result. The problem can be
triggered with:

make -k check RUNTESTFLAGS="--target_board=unix\{,-m32\}"

FAIL: gcc.dg/atomic-compare-exchange-5.c (test for excess errors)
WARNING: gcc.dg/atomic-compare-exchange-5.c compilation failed to
produce executable
FAIL: gcc.dg/atomic-exchange-5.c (test for excess errors)
WARNING: gcc.dg/atomic-exchange-5.c compilation failed to produce executable
FAIL: gcc.dg/atomic-load-5.c (test for excess errors)
WARNING: gcc.dg/atomic-load-5.c compilation failed to produce executable
FAIL: gcc.dg/atomic-op-5.c (test for excess errors)
WARNING: gcc.dg/atomic-op-5.c compilation failed to produce executable
FAIL: gcc.dg/atomic-store-5.c (test for excess errors)
WARNING: gcc.dg/atomic-store-5.c compilation failed to produce executable
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O0 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O1 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O2 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O3 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -Os -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-other-int128.c  -O0 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-other-int128.c  -O1 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-other-int128.c  -O2 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-other-int128.c  -O3 -g  (test for
excess errors)
FAIL: gcc.dg/simulate-thread/atomic-other-int128.c  -Os -g  (test for
excess errors)

2011-11-07  Uros Bizjak  <ubizjak@gmail.com>

	* lib/target-supports.exp (check_effective_target_sync_int_128):
	Don't cache the result.
	(check_effective_target_sync_long_long): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to SVN.

Uros.
diff mbox

Patch

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 181080)
+++ lib/target-supports.exp	(working copy)
@@ -3542,39 +3542,23 @@ 
 # Return 1 if the target supports atomic operations on "int_128" values.
 
 proc check_effective_target_sync_int_128 { } {
-    global et_sync_int_128_saved
-
-    if [info exists et_sync_int_128_saved] {
-        verbose "check_effective_target_sync_int_128: using cached result" 2
+    if { ([istarget x86_64-*-*] || [istarget i?86-*-*])
+	 && ![is-effective-target ia32] } {
+	return 1
     } else {
-        set et_sync_int_128_saved 0
-        if { ([istarget x86_64-*-*] || [istarget i?86-*-*])
-	     && ![is-effective-target ia32] } {
-           set et_sync_int_128_saved 1
-        }
+	return 0
     }
-
-    verbose "check_effective_target_sync_int_128: returning $et_sync_int_128_saved" 2
-    return $et_sync_int_128_saved
 }
 
 # Return 1 if the target supports atomic operations on "long long".
 
 proc check_effective_target_sync_long_long { } {
-    global et_sync_long_long_saved
-
-    if [info exists et_sync_long_long_saved] {
-        verbose "check_effective_target_sync_long_long: using cached result" 2
+    if { ([istarget x86_64-*-*] || [istarget i?86-*-*])
+	 && ![is-effective-target ia32] } {
+	return 1
     } else {
-        set et_sync_long_long_saved 0
-        if { ([istarget x86_64-*-*] || [istarget i?86-*-*])
-	     && ![is-effective-target ia32] } {
-           set et_sync_long_long_saved 1
-        }
+	return 0
     }
-
-    verbose "check_effective_target_sync_long_long: returning $et_sync_long_long_saved" 2
-    return $et_sync_long_long_saved
 }
 
 # Return 1 if the target supports atomic operations on "int" and "long".