Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / abstract02.f90
blob29aad7b03e53740305c7d2900d53e2dfd7cb54b1
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test misuse of abstract interfaces
3 program test
4 abstract interface
5 subroutine abstract
6 end subroutine
7 end interface
8 procedure(abstract), pointer :: p
9 !ERROR: Abstract procedure interface 'abstract' may not be referenced
10 call abstract
11 !ERROR: Abstract procedure interface 'abstract' may not be used as a designator
12 p => abstract
13 !ERROR: Abstract procedure interface 'abstract' may not be used as a designator
14 call foo(abstract)
15 !ERROR: Abstract procedure interface 'abstract' may not be used as a designator
16 print *, associated(p, abstract)
17 end