Peter Klausler e6da91810e
[flang] Fix crash from undetected program error. (#159847)
When a function or subroutine interface block conflicts with a name
already in scope, emit an error and avoid a crash.

Fixes https://github.com/llvm/llvm-project/issues/159554.
2025-09-23 15:44:59 -07:00

9 lines
212 B
Fortran

!RUN: %python %S/test_errors.py %s %flang_fc1
use, intrinsic :: iso_c_binding
interface c_funloc
!ERROR: 'c_funloc' is already declared in this scoping unit
function c_funloc()
end function
end interface
end