diff flang/test/Semantics/resolve22.f90 @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents
children 2e18cbf3894f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flang/test/Semantics/resolve22.f90	Mon May 25 11:55:54 2020 +0900
@@ -0,0 +1,32 @@
+! RUN: %S/test_errors.sh %s %t %f18
+subroutine s1
+  !OK: interface followed by type with same name
+  interface t
+  end interface
+  type t
+  end type
+  type(t) :: x
+  x = t()
+end subroutine
+
+subroutine s2
+  !OK: type followed by interface with same name
+  type t
+  end type
+  interface t
+  end interface
+  type(t) :: x
+  x = t()
+end subroutine
+
+subroutine s3
+  type t
+  end type
+  interface t
+  end interface
+  !ERROR: 't' is already declared in this scoping unit
+  type t
+  end type
+  type(t) :: x
+  x = t()
+end subroutine