OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [modify_a_constant.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
--  { dg-do compile }
2
 
3
with text_io; use text_io;
4
procedure modify_a_constant is
5
    type Outer;
6
    type Inner (Outer_Ref : access Outer) is limited null record;
7
 
8
    type Outer is limited record
9
        Inner_Field   : Inner (Outer_Ref => Outer'Access);
10
        Integer_Field : Integer;
11
      end record;
12
 
13
    X : constant Outer := (Inner_Field => <>, Integer_Field => 123);
14
 
15
begin
16
   Put_Line (Integer'image (X.Integer_Field));
17
   X.Inner_Field.Outer_Ref.Integer_Field := 0;
18
   Put_Line (Integer'image (X.Integer_Field));
19
end Modify_A_Constant;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.