diff gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,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