From: Kewen Lin Date: Wed, 11 Jan 2023 12:59:24 +0000 (-0600) Subject: rs6000/test: Make ppc-fortran.exp only available for PowerPC target X-Git-Tag: basepoints/gcc-14~2099 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de99049f6fe5341024d4d939ac50d063280f90db;p=thirdparty%2Fgcc.git rs6000/test: Make ppc-fortran.exp only available for PowerPC target When testing one patch which adds a fortran test case into test bucket powerpc/ppc-fortran/, I found one unexpected failure on a non-PowerPC target. It's due to that ppc-fortran.exp does not exit early if the testing target isn't a PowerPC target. This patch is to make it exit immediately if the testing target isn't a PowerPC target. gcc/testsuite/ChangeLog: * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Exit immediately if the testing target isn't a PowerPC target. --- diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp index bd7ad95ad0d8..ded643b56bfa 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp +++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp @@ -16,6 +16,11 @@ # GCC testsuite that uses the `dg.exp' driver. +# Exit immediately if this isn't a PowerPC target. +if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then { + return +} + # Load support procs. load_lib gfortran-dg.exp