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.
19 lines
520 B
Fortran
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
|