view gcc/testsuite/gfortran.dg/char_result_mod_19.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

! { dg-do  run }
! { dg-additional-sources char_result_19.f90 }
!
! Module for char_result_19.f90
! Tests fix for PR86248
!
module test_module
  implicit none
  public :: func_1
  private
  character(len=*),dimension(0:2),parameter :: darray = (/"el0 ","el11","el2 "/)
contains
  function func_1 (func_1_input) result(f)
    integer, intent(in) :: func_1_input
    character(len = len_trim (darray(func_1_input))) :: f
    f = darray(func_1_input)
  end function func_1
end module test_module