aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/algol68/execute/string-2.a68
blob: b0b898a51ef106483dec66bfa57d6f6811808711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# { dg-options "-fstropping=upper" }  #
BEGIN STRING s;
      ASSERT (LWB s = 1 AND UPB s = 0 AND ELEMS s = 0);
      s := "foo";
      puts (s);
      ASSERT (LWB s = 1 AND UPB s = 3 AND s[1] = "f" AND s[2] = "o" AND s[3] = "o");
      s := "bar";
      puts (s);
      ASSERT (LWB s = 1 AND UPB s = 3 AND s[1] = "b" AND s[2] = "a" AND s[3] = "r");
      s := "x";
      ASSERT (LWB s = 1 AND UPB s = 1 AND s[1] = "x");
      puts (s)
END