2008-07-06 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / optional_assumed_charlen_1.f90
blob90631aa616e5ea0f3c33947a2d32b1aa55065f58
1 ! { dg-do compile }
2 ! Tests the fix for PR29284 in which an ICE would occur in converting
3 ! the call to a suboutine with an assumed character length, optional
4 ! dummy that is not present.
6 ! Contributed by Rakuen Himawari <rakuen_himawari@yahoo.co.jp>
8 MODULE foo
9 CONTAINS
10 SUBROUTINE sub1(a)
11 CHARACTER (LEN=*), OPTIONAL :: a
12 WRITE(*,*) 'foo bar'
13 END SUBROUTINE sub1
15 SUBROUTINE sub2
16 CALL sub1()
17 END SUBROUTINE sub2
19 END MODULE foo
20 ! { dg-final { cleanup-modules "foo" } }