aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/merge_char_3.f90
blob: 114214136e21b50d12952057581adc9e1a1797af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do run }
! { dg-options "-fbounds-check" }
! { dg-shouldfail "Unequal character lengths" }

! PR fortran/38137
! Test that -fbounds-check detects unequal character lengths to MERGE
! at runtime.

! Contributed by Tobias Burnus <burnus@gcc.gnu.org>

subroutine foo(a)
implicit none
character(len=*) :: a
character(len=3) :: b
logical :: ll = .true.
print *, merge(a,b,ll)  ! Unequal character lengths
end subroutine foo

call foo("ab")
end