OSDN Git Service

* gcc.dg/20020919-1.c: Correct target selector to alpha*-*-*.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / auto_char_len_4.f90
1 ! { dg-do compile }
2 ! Tests the fix for PR25087, in which the following invalid code
3 ! was not detected.
4 !
5 ! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
6 !
7 SUBROUTINE s(n)
8   CHARACTER(LEN=n), EXTERNAL :: a ! { dg-error "must have an explicit interface" }
9   interface
10     function b (m)                ! This is OK
11       CHARACTER(LEN=m) :: b
12       integer :: m
13     end function b
14   end interface
15   write(6,*) a(n)
16   write(6,*) b(n)
17   write(6,*) c()
18 contains
19     function c ()                ! This is OK
20       CHARACTER(LEN=n):: c
21       c = ""
22     end function c
23 END SUBROUTINE s
24