summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs/access_constant.ads
blob: fa9829e8396b3cb0e5d78b22e131f59009a182f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- { dg-do compile }
package Access_Constant is

   c: aliased constant integer := 3;

   type const_ptr is access constant integer;
   cp : const_ptr := c'access;

   procedure inc (var_ptr: access integer :=
     cp)  -- { dg-error "access-to-constant" }
      is abstract;

end Access_Constant;