xref: /llvm-project/flang/test/Semantics/rewrite01.f90 (revision 4bd08dab5ff99d094513f4adf4bf16bbce8f5a1f)
1! RUN: %flang_fc1 -fdebug-dump-parse-tree %s 2>&1 | FileCheck %s
2! Ensure that READ(CVAR) [, item-list] is corrected when CVAR is a
3! character variable so as to be a formatted read from the default
4! unit, not an unformatted read from an internal unit (which is not
5! possible in Fortran).
6character :: cvar
7! CHECK-NOT: IoUnit -> Variable -> Designator -> DataRef -> Name = 'cvar'
8! CHECK: Format -> Expr = 'cvar'
9read(cvar)
10end
11