[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / auto_char_dummy_array_3.f90
blob053956cabfd283849f7a7f422a551d7ab0eaa6e8
1 ! { dg-do run }
3 ! PR fortran/49885
4 ! Check that character arrays with non-constant char-length are handled
5 ! correctly.
7 ! Contributed by Daniel Kraft <d@domob.eu>,
8 ! based on original test case and variant by Tobias Burnus in comment 2.
10 PROGRAM main
11 IMPLICIT NONE
13 CALL s (10)
15 CONTAINS
17 SUBROUTINE s (nb)
18 INTEGER :: nb
19 CHARACTER(MAX (80, nb)) :: bad_rec(1)
21 bad_rec(1)(1:2) = 'abc'
22 IF (bad_rec(1)(1:2) /= 'ab') CALL abort ()
23 END SUBROUTINE s
25 END PROGRAM main