Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/merge_char_3.f90 @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 ! { dg-do run } |
2 ! { dg-options "-fbounds-check" } | |
3 ! { dg-shouldfail "Unequal character lengths" } | |
4 | |
5 ! PR fortran/38137 | |
6 ! Test that -fbounds-check detects unequal character lengths to MERGE | |
7 ! at runtime. | |
8 | |
9 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org> | |
10 | |
11 subroutine foo(a) | |
12 implicit none | |
13 character(len=*) :: a | |
14 character(len=3) :: b | |
15 logical :: ll = .true. | |
16 print *, merge(a,b,ll) ! Unequal character lengths | |
17 end subroutine foo | |
18 | |
19 call foo("ab") | |
20 end |