Peter Klausler 69373a5d3f [flang] Check for invalid BIND(C) names
Require BIND(C) interoperable names to be valid C identifiers.

Differential Revision: https://reviews.llvm.org/D143833
2023-02-13 16:53:43 -08:00

11 lines
399 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
!ERROR: Symbol has a BIND(C) name that is not a valid C language identifier
subroutine bang() bind(C,name='!')
end
!ERROR: Symbol has a BIND(C) name that is not a valid C language identifier
subroutine cr() bind(C,name=achar(13))
end
!ERROR: Symbol has a BIND(C) name that is not a valid C language identifier
subroutine beast() bind(C,name="666")
end