! { dg-do compile } ! { dg-options "-fdump-tree-original" } ! ! Test fix of second testcase in PR64120. ! The first testcase is allocatable_scalar_14.f90. ! ! Contributed by Francois-Xavier Coudert ! program test logical :: L L = g(1) write(*,*) L L = g(2) write(*,*) L contains logical function g(x) integer :: x character(len=x), allocatable :: s save if(.NOT.allocated(s)) then allocate(s) g = .FALSE. else g = .TRUE. end if write(*,*) len(s) end function g end ! { dg-final { scan-tree-dump-times "s = 0B;" 2 "original" } } ! { dg-final { scan-tree-dump-times "__builtin_free" 1 "original" } }