llvm-project/flang/test/Semantics/resolve107.f90
Peter Klausler 0f500d3dae [flang] Downgrade benign error message to a warning
It's not conforming to specify the SAVE attribute more than
once for a variable, but it also doesn't hurt anything and
isn't fatal in other Fortran compilers.  Downgrade the
message to a warning for better portability.

Differential Revision: https://reviews.llvm.org/D117153
2022-01-13 16:27:40 -08:00

14 lines
368 B
Fortran

! RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s
! Check warning on multiple SAVE attribute specifications
subroutine saves
save x
save y
!CHECK: SAVE attribute was already specified on 'y'
integer, save :: y
integer, save :: z
!CHECK: SAVE attribute was already specified on 'x'
!CHECK: SAVE attribute was already specified on 'z'
save x,z
end