OSDN Git Service

2010-11-13 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / assumed_charlen_function_4.f90
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy" }
3 !
4 ! Tests the fix for PR28600 in which the declaration for the
5 ! character length n, would be given the DECL_CONTEXT of 'gee'
6 ! thus causing an ICE.
7 !
8 ! Contributed by Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9 !
10 subroutine bar(s, n)
11  integer n
12  character s*(n)
13  character*3, dimension(:), pointer :: m
14  s = ""
15 contains
16  subroutine gee
17     m(1) = s(1:3)
18  end subroutine gee
19 end subroutine bar