Files
clang-p2996/flang/test/Semantics/declarations04.f90
Andre Kuhlenschmidt 83b462af17 [flang][CLI] Have the CLI hint the flag to disable a warning (#144767)
Adds a hint to the warning message to disable a warning and updates the
tests to expect this.

Also fixes a bug in the storage of canonical spelling of error flags so
that they are not used after free.
2025-06-30 10:17:05 -07:00

32 lines
651 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
! test global name conflicts
subroutine ext1
end
subroutine ext2
!ERROR: Two entities have the same global name 'ext1'
common /ext1/ x
end
module ext4
contains
!ERROR: Two entities have the same global name 'ext2'
subroutine foo() bind(c,name="ext2")
end
!ERROR: Two entities have the same global name 'ext3'
subroutine bar() bind(c,name="ext3")
end
end
block data ext3
!PORTABILITY: Global name 'ext4' conflicts with a module [-Wbenign-name-clash]
common /ext4/ x
end
subroutine s
!ERROR: Two entities have the same global name 'foo'
common /foo/n
call foo
end