annotate gcc/testsuite/gfortran.dg/bounds_check_strlen_3.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 ! { dg-shouldfail "Character length mismatch" }
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 ! PR fortran/37746
kono
parents:
diff changeset
6 ! Test bounds-checking for string length of dummy arguments.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 MODULE m
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 CONTAINS
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 SUBROUTINE test (str)
kono
parents:
diff changeset
13 IMPLICIT NONE
kono
parents:
diff changeset
14 CHARACTER(len=5), POINTER :: str
kono
parents:
diff changeset
15 END SUBROUTINE test
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 SUBROUTINE test2 (n)
kono
parents:
diff changeset
18 IMPLICIT NONE
kono
parents:
diff changeset
19 INTEGER :: n
kono
parents:
diff changeset
20 CHARACTER(len=n), POINTER :: str
kono
parents:
diff changeset
21 CALL test (str)
kono
parents:
diff changeset
22 END SUBROUTINE test2
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 END MODULE m
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 PROGRAM main
kono
parents:
diff changeset
27 USE m
kono
parents:
diff changeset
28 IMPLICIT NONE
kono
parents:
diff changeset
29 CALL test2 (7) ! Too long.
kono
parents:
diff changeset
30 END PROGRAM main
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 ! { dg-output "does not match the declared one for dummy argument 'str' \\(7/5\\)" }