24 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Test misuse of abstract interfaces3program test4 abstract interface5 subroutine abstract6 end subroutine7 !ERROR: An ABSTRACT interface may not have the same name as an intrinsic type8 function integer()9 end10 !ERROR: An ABSTRACT interface may not have the same name as an intrinsic type11 subroutine logical12 end13 end interface14 procedure(abstract), pointer :: p15 !ERROR: Abstract procedure interface 'abstract' may not be referenced16 call abstract17 !ERROR: Abstract procedure interface 'abstract' may not be used as a designator18 p => abstract19 !ERROR: Abstract procedure interface 'abstract' may not be used as a designator20 call foo(abstract)21 !ERROR: Abstract procedure interface 'abstract' may not be used as a designator22 print *, associated(p, abstract)23end24