Files
llvm-project/flang/test/Semantics/label18.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

19 lines
520 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
program main
if (.true.) then
do j = 1, 2
goto 1 ! ok; used to cause looping in label resolution
end do
else
goto 1 ! ok
1 end if
if (.true.) then
do j = 1, 2
!WARNING: Label '1' is in a construct that should not be used as a branch target here [-Wbranch-into-construct]
goto 1
end do
end if
!WARNING: Label '1' is in a construct that should not be used as a branch target here [-Wbranch-into-construct]
goto 1
end