xref: /llvm-project/flang/test/Semantics/save02.f90 (revision 996ef895cd3d1313665a42fc8e20d1d4e1cf2a28)
1! RUN: %flang_fc1 -fsyntax-only -fno-automatic %s 2>&1 | FileCheck %s --allow-empty
2! Checks that -fno-automatic implies the SAVE attribute.
3! This same subroutine appears in test save01.f90 where it is an
4! error case due to the absence of both SAVE and -fno-automatic.
5subroutine foo
6  integer, target :: t
7  !CHECK-NOT: error:
8  integer, pointer :: p => t
9end
10