summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/realloc_on_assign_26.f90
blob: 4791c24e14f2658f0b2772620bce9e84cd4d9390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do run }
! PR 68147 - no temprorary within the IF statement.
! Original test case by Martin Reinecke.
program test
  implicit none
  character(len=:),allocatable ::name
  name="./a.out"
  if (index(name,"/")  /=  0) THEN
    name=name(3:)
    if (name .ne. "a.out") call abort
  endif
end program