xref: /llvm-project/flang/test/Semantics/data17.f90 (revision 13893a08d91313900857be494ee4702a4f0847af)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2character(4) a, b, c, d, e, f
3!WARNING: DATA statement value '"abcde"' for 'a' has the wrong length
4data a(1:4)/'abcde'/
5!WARNING: DATA statement value '"abc"' for 'b' has the wrong length
6data b(1:4)/'abc'/
7data c/'abcde'/ ! not a substring, conforms
8data d/'abc'/ ! not a substring, conforms
9!ERROR: Substring must end at 4 or earlier, not 5
10data e(1:5)/'abcde'/
11!ERROR: Substring must begin at 1 or later, not 0
12data f(0:4)/'abcde'/
13end
14