aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
blob: 5c929e8ae39cc1427708f5a4f259c736eafdd8c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! Tests the fix for PR29284 in which an ICE would occur in converting
! the call to a suboutine with an assumed character length, optional
! dummy that is not present.
!
! Contributed by Rakuen Himawari  <rakuen_himawari@yahoo.co.jp>
!
      MODULE foo
      CONTAINS
        SUBROUTINE sub1(a)
          CHARACTER (LEN=*), OPTIONAL :: a
          WRITE(*,*) 'foo bar'
        END SUBROUTINE sub1

      SUBROUTINE sub2
        CALL sub1()
      END SUBROUTINE sub2

     END MODULE foo