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

package body pointer_variable_bounds is

  function COMPONENT_DAT(BP : in BUNDLE_POINTER_TYPE; CP : in COMP_POINTER_TYPE) return HALF_INTEGER is
    type CP_TYPE is access COMP_POINTER_TYPE;
    type CD_TYPE is access HALF_INTEGER;
    CD : CD_TYPE;
  begin
    return CD.all;
  end;

  procedure BUNDLE_DAT(BP : in BUNDLE_POINTER_TYPE) is
    N0 : C_POINTER_TYPE := COMPONENT_DAT(BP, 4);
  begin
    null;
  end;

  procedure SEQUENCE_DAT(BP : in BUNDLE_POINTER_TYPE) is
    N0 : C_POINTER_TYPE := COMPONENT_DAT(BP, 4);
  begin
    null;
  end;

end pointer_variable_bounds;