Hi Alexandre,

on 2023/4/6 14:19, Alexandre Oliva wrote:
> 
> Skip ppc-fortran.exp if a trivial fortran program cannot be compiled.
> 

IIUC, without this patch and under the configuration disabling fortran,
all the cases in this sub-testsuite would fail?  Thanks for fixing!

> Regstrapped on x86_64-linux-gnu and ppc64-linux-gnu.  Also tested on
> ppc64-vx7r2 with gcc-12, with the Fortran language disabled.  Ok to
> install?
> 
> 
> for  gcc/testsuite/ChangeLog
> 
>       * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: Test for
>       fortran compiler, skip if missing.
> ---
>  .../gcc.target/powerpc/ppc-fortran/ppc-fortran.exp |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> 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 f7e99ac848753..d05c27ab589a7 100644
> --- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> +++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
> @@ -33,6 +33,15 @@ if ![info exists DEFAULT_FFLAGS] then {
>  # Initialize `dg'.
>  dg-init
> 
> +if { ![check_no_compiler_messages fortran_available assembly {
> +! Fortran
> +program P
> +  stop
> +end program P
> +} ""] } {
> +    return
> +}
> +

super nit: this check only needs proc check_no_compiler_messages,
can it be moved a bit upward just after line "load_lib gfortran-dg.exp"
then it can skip more unnecessary codes?

OK with this nit fixed (if you agree).  Thanks!

BR,
Kewen


Reply via email to