When a Hollerith actual argument is associated with an unlimited polymorphic dummy argument, it's treated as if it were CHARACTER. Some other compilers treat it as if it had been BOZ, so emit a portability warning. Resolves https://github.com/llvm/llvm-project/issues/83548.
13 lines
309 B
Fortran
13 lines
309 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
|
|
module m
|
|
contains
|
|
subroutine unlimited(x)
|
|
class(*), intent(in) :: x
|
|
end
|
|
subroutine test
|
|
!PORTABILITY: passing Hollerith to unlimited polymorphic as if it were CHARACTER
|
|
call unlimited(6HHERMAN)
|
|
call unlimited('abc') ! ok
|
|
end
|
|
end
|