PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / optional_assumed_charlen_1.f90
blob5c929e8ae39cc1427708f5a4f259c736eafdd8c4
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