diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90 b/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90 new file mode 100644 index 000000000..90631aa61 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90 @@ -0,0 +1,20 @@ +! { 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 +! { dg-final { cleanup-modules "foo" } } |