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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [modify_a_constant.adb] - Rev 720

Go to most recent revision | Compare with Previous | Blame | View Log

--  { dg-do compile }
 
with text_io; use text_io;
procedure modify_a_constant is
    type Outer;
    type Inner (Outer_Ref : access Outer) is limited null record;
 
    type Outer is limited record
        Inner_Field   : Inner (Outer_Ref => Outer'Access);
        Integer_Field : Integer;
      end record;
 
    X : constant Outer := (Inner_Field => <>, Integer_Field => 123);
 
begin
   Put_Line (Integer'image (X.Integer_Field));
   X.Inner_Field.Outer_Ref.Integer_Field := 0;
   Put_Line (Integer'image (X.Integer_Field));
end Modify_A_Constant;
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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