1-- { dg-do compile }
2-- { dg-options "-O" }
3
4package body Opt17 is
5
6  function Func return S is
7    V : String (1 .. 6);
8  begin
9    V (1 .. 3) := "ABC";
10    return V (1 .. 5);
11  end;
12
13end Opt17;
14