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

14 lines
654 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror
subroutine assumedshape(normal, contig)
real normal(:)
real, contiguous :: contig(:)
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
!BECAUSE: Element of assumed-shape array may not be associated with a dummy argument 'assumedsize=' array
call seqAssociate(normal(1))
!PORTABILITY: Element of contiguous assumed-shape array is accepted for storage sequence association [-Wcontiguous-ok-for-seq-association]
call seqAssociate(contig(1))
end
subroutine seqAssociate(assumedSize)
real assumedSize(*)
end