mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 22:06:36 +00:00

The handling of accessibility attributes on GENERIC statements outside derived type definitions is incorrect in name resolution. Change it to use the usual BeginAttrs()/EndAttrs() infrastructure. Differential Revision: https://reviews.llvm.org/D159032
23 lines
513 B
Fortran
23 lines
513 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Ensure that accessibility works on GENERIC statement
|
|
module m
|
|
generic, public :: public => specific
|
|
generic, private :: private => specific
|
|
contains
|
|
subroutine specific
|
|
end
|
|
end
|
|
program main
|
|
use m
|
|
generic :: public => internal
|
|
generic :: private => internal
|
|
call public
|
|
call public(1)
|
|
!ERROR: No specific subroutine of generic 'private' matches the actual arguments
|
|
call private
|
|
call private(1)
|
|
contains
|
|
subroutine internal(n)
|
|
end
|
|
end
|