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

21 lines
654 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
module m
!PORTABILITY: Specific procedure 'sin' of generic interface 'yintercept' should not be INTRINSIC [-Wintrinsic-as-specific]
intrinsic sin
interface yIntercept
procedure sin
end interface
!PORTABILITY: Specific procedure 'cos' of generic interface 'xintercept' should not be INTRINSIC [-Wintrinsic-as-specific]
intrinsic cos
generic :: xIntercept => cos
end module
subroutine foo
interface slope
procedure tan
end interface
!ERROR: Specific procedure 'tan' of generic interface 'slope' may not be a statement function
tan(x) = sin(x) / cos(x)
end subroutine