annotate gcc/testsuite/gfortran.dg/bounds_check_strlen_9.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-fbounds-check" }
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! PR fortran/40452
kono
parents:
diff changeset
5 ! The following program is valid Fortran 90 and later.
kono
parents:
diff changeset
6 ! The storage-sequence association of the dummy argument
kono
parents:
diff changeset
7 ! allows that the actual argument ["ab", "cd"] is mapped
kono
parents:
diff changeset
8 ! to the dummy argument a(1) which perfectly fits.
kono
parents:
diff changeset
9 ! (The dummy needs to be an array, however.)
kono
parents:
diff changeset
10 !
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 program test
kono
parents:
diff changeset
13 implicit none
kono
parents:
diff changeset
14 call sub(["ab", "cd"])
kono
parents:
diff changeset
15 contains
kono
parents:
diff changeset
16 subroutine sub(a)
kono
parents:
diff changeset
17 character(len=4) :: a(1)
kono
parents:
diff changeset
18 print *, a(1)
kono
parents:
diff changeset
19 end subroutine sub
kono
parents:
diff changeset
20 end program test