summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/aggr13.adb
blob: add223c0bf149f1fcfc34c9037129d52c8350a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- { dg-do compile }
-- { dg-options "-fdump-tree-gimple" }

procedure Aggr13 is

   type A is array (Integer range 1 .. 3) of Short_Short_Integer;

   X : A := (1, 2, 3);

   function F return A is
   begin
      if X /= (1, 2, 3) then
        raise Program_Error;
      end if;
      return (1, 1, 1);
   end;

begin
  X := F;
end;

-- { dg-final { scan-tree-dump-not "= {}" "gimple" } }
-- { dg-final { cleanup-tree-dump "gimple" } }