On Thu, May 23, 2019 at 5:21 AM Hans-Peter Nilsson
<hans-peter.nils...@axis.com> wrote:
>
> There was a regression for gfortran.dg/fmt_en.f90 for cris-elf
> that on inspection was due to it having acquired a truncation
> call through the runtime.  I updated that and the new tests that
> had "Fortran runtime error: required ftruncate or chsize support
> not present" messages in gfortran.log, ran past cris-elf and
> committed as obvious.  See also
> <https://gcc.gnu.org/ml/gcc-patches/2008-05/msg00975.html> from
> which I copy-pasted most of this message.  (Yep, 11 years ago.)
>
> gcc/testsuite:
>         * gfortran.dg/dec_io_1.f90, gfortran.dg/dtio_1.f90,
>         gfortran.dg/dtio_12.f90, gfortran.dg/fmt_en.f90,
>         gfortran.dg/namelist_89.f90: Gate test on effective_target
>         fd_truncate.
>
> diff --git gcc/testsuite/gfortran.dg/dec_io_1.f90 
> gcc/testsuite/gfortran.dg/dec_io_1.f90
> index 2edc427..58daf30 100644
> --- gcc/testsuite/gfortran.dg/dec_io_1.f90
> +++ gcc/testsuite/gfortran.dg/dec_io_1.f90
> @@ -1,4 +1,4 @@
> -! { dg-do run }
> +! { dg-do run { target fd_truncate } }
>  ! { dg-options "-fdec" }
>  !
>  ! Run-time tests for values of DEC I/O parameters (doesn't test 
> functionality).
> diff --git gcc/testsuite/gfortran.dg/dtio_1.f90 
> gcc/testsuite/gfortran.dg/dtio_1.f90
> index c6f17d9..b168d30 100644
> --- gcc/testsuite/gfortran.dg/dtio_1.f90
> +++ gcc/testsuite/gfortran.dg/dtio_1.f90
> @@ -1,4 +1,4 @@
> -! { dg-do run  }
> +! { dg-do run { target fd_truncate } }
>  !
>  ! Functional test of User Defined Derived Type IO, Formatted WRITE/READ
>  !
> diff --git gcc/testsuite/gfortran.dg/dtio_12.f90 
> gcc/testsuite/gfortran.dg/dtio_12.f90
> index 54b10cb..ac6d9e7 100644
> --- gcc/testsuite/gfortran.dg/dtio_12.f90
> +++ gcc/testsuite/gfortran.dg/dtio_12.f90
> @@ -1,4 +1,4 @@
> -! { dg-do run }
> +! { dg-do run { target fd_truncate } }
>  !
>  ! Test the fix for PR77657 in which the DTIO subroutine was not found,
>  ! which led to an error in attempting to link to the abstract interface.
> diff --git gcc/testsuite/gfortran.dg/fmt_en.f90 
> gcc/testsuite/gfortran.dg/fmt_en.f90
> index b3597e4..89011b3 100644
> --- gcc/testsuite/gfortran.dg/fmt_en.f90
> +++ gcc/testsuite/gfortran.dg/fmt_en.f90
> @@ -1,4 +1,4 @@
> -! { dg-do run }
> +! { dg-do run { target fd_truncate } }
>  ! PR60128 Invalid outputs with EN descriptors
>  ! Test case provided by Walt Brainerd.
>  program pr60128
> diff --git gcc/testsuite/gfortran.dg/namelist_89.f90 
> gcc/testsuite/gfortran.dg/namelist_89.f90
> index fbb7143..91f64fe 100644
> --- gcc/testsuite/gfortran.dg/namelist_89.f90
> +++ gcc/testsuite/gfortran.dg/namelist_89.f90
> @@ -1,4 +1,4 @@
> -! { dg-do run }
> +! { dg-do run { target fd_truncate } }
>  ! PR69456 Namelist value with trailing sign is ignored without error
>  implicit none
>  integer :: ios

Do you know which commit caused this? Was it something recent? Based
on a quick look, at least for fmt_en this shouldn't happen..

Since this seems to happen semi-regularly, would it be possible to do
something at the dejagnu level, e.g. to fail a test that uses
ftruncate/chsize even though it's not marked with target fd_truncate.
Hard to see how that could be verified without running testcases under
strace or something like that.
-- 
Janne Blomqvist

Reply via email to