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

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

! { dg-do compile }
! { dg-require-effective-target lto }
! { dg-options "-flto" }
! PR 78867, test case adapted from gfortran.dg/string_length_1.f90
program pr78867
  if (len(bar(2_8)) /= 2) STOP 1
contains

  function bar(i)
    integer(8), intent(in) :: i
    character(len=i) :: bar
  
    bar = ""
  end function bar

end program pr78867