URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [renaming2.adb] - Rev 484
Go to most recent revision | Compare with Previous | Blame | View Log
-- { dg-do run } -- { dg-options "-gnatws" } with Text_IO; procedure renaming2 is type RealNodeData; type RefRealNodeData is access RealNodeData; type ExpressionEntry; type RefExpression is access ExpressionEntry; type RefDefUseEntry is access Natural; type ExpressionEntry is record Number : RefDefUseEntry; Id : Integer; end record; type RealNodeData is record Node : RefExpression; Id : Integer; end record; for ExpressionEntry use record Number at 0 range 0 .. 63; Id at 8 range 0 .. 31; end record ; for RealNodeData use record Node at 0 range 0 .. 63; Id at 8 range 0 .. 31; end record ; U_Node : RefDefUseEntry := new Natural'(1); E_Node : RefExpression := new ExpressionEntry'(Number => U_Node, Id => 2); R_Node : RefRealNodeData := new RealNodeData'(Node => E_Node, Id => 3); procedure test_routine (NodeRealData : RefRealNodeData) is OldHead : RefDefUseEntry renames NodeRealData.all.Node.all.Number; OldHead1 : constant RefDefUseEntry := OldHead; begin NodeRealData.all.Node := new ExpressionEntry'(Number => null, Id => 4); declare OldHead2 : constant RefDefUseEntry := OldHead; begin if OldHead1 /= OldHead2 then Text_IO.Put_Line (" OldHead changed !!!"); end if; end; end; begin test_routine (R_Node); end;
Go to most recent revision | Compare with Previous | Blame | View Log