]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: Change {dg-do-what-default} save and restore logical.
authorXing Li <lixing@loongson.cn>
Wed, 16 Apr 2025 02:29:57 +0000 (10:29 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Sat, 19 Apr 2025 00:58:41 +0000 (08:58 +0800)
The set of {dg-do-what-default} to 'run' may lead some test hang
during make check.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/vector/loongarch-vector.exp: Change
{dg-do-what-default} save and restore logical.

(cherry picked from commit dd982198656d914a4958bf86356a4c996c728b9d)

gcc/testsuite/gcc.target/loongarch/vector/loongarch-vector.exp

index 823c2230c3fb0ea7e8e4ee374f9e09285866b87c..dc75eb6aec2033cc942b24c8b8e5cf864c5ed6d6 100644 (file)
@@ -35,7 +35,7 @@ dg-init
 
 # If the target hardware supports LSX, the default action is "run", otherwise
 # just "compile".
-global dg-do-what-default
+set saved-dg-do-what-default ${dg-do-what-default}
 if {[check_effective_target_loongarch_sx_hw]} then {
   set dg-do-what-default run
 } else {
@@ -45,6 +45,7 @@ if {[check_effective_target_loongarch_sx_hw]} then {
 #Main loop.
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/lsx/*.\[cS\]]] \
        " -mlsx" $DEFAULT_CFLAGS
+set dg-do-what-default ${saved-dg-do-what-default}
 
 dg-finish
 
@@ -52,7 +53,7 @@ dg-init
 # If the target hardware supports LASX, the default action is "run", otherwise
 # just "compile".
 
-global dg-do-what-default
+set saved-dg-do-what-default ${dg-do-what-default}
 if {[check_effective_target_loongarch_asx_hw]} then {
   set dg-do-what-default run
 } else {
@@ -61,5 +62,6 @@ if {[check_effective_target_loongarch_asx_hw]} then {
 
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/lasx/*.\[cS\]]] \
        " -mlasx" $DEFAULT_CFLAGS
+set dg-do-what-default ${saved-dg-do-what-default}
 # All done.
 dg-finish