]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] [ppc] skip ppc-fortran if fortran is disabled
authorAlexandre Oliva <oliva@adacore.com>
Fri, 7 Apr 2023 04:04:32 +0000 (01:04 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 7 Apr 2023 04:04:32 +0000 (01:04 -0300)
Skip ppc-fortran.exp if a trivial fortran program cannot be compiled.

for  gcc/testsuite/ChangeLog

* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Test for
fortran compiler, skip if missing.

gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp

index f7e99ac8487534709295954b9f035c60207013b3..f7b7c05487cda3da8148a1f7d48b680fdff9b7b0 100644 (file)
@@ -21,6 +21,16 @@ if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then {
   return
 }
 
+# Make sure there is a fortran compiler to test.
+if { ![check_no_compiler_messages fortran_available assembly {
+! Fortran
+program P
+  stop
+end program P
+} ""] } {
+    return
+}
+
 # Load support procs.
 load_lib gfortran-dg.exp