view gcc/testsuite/gfortran.dg/string_length_3.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
! { dg-options "-ffrontend-optimize -fdump-tree-original" }
! PR 78021 - calls to mylen were folded after shortening the
! argument list.

PROGRAM test_o_char
  implicit none
  integer :: n
  n = mylen('c') + mylen('c   ')
  if (n /= 5) STOP 1
CONTAINS

  FUNCTION mylen(c)
    CHARACTER(len=*),INTENT(in) :: c
    INTEGER :: mylen
    mylen=LEN(c)
  END FUNCTION mylen
END PROGRAM test_o_char
! { dg-final { scan-tree-dump-times "__var" 0 "original" } }