Commit e66d38fe by Eric Botcazou Committed by Eric Botcazou

* gnat.dg/opt13_pkg.ad[sb]: Fix line ending.

From-SVN: r168227
parent 877bf195
2010-12-24 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt13_pkg.ad[sb]: Fix line ending.
2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com> 2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com>
* obj-c.dg/gnu-api-2-class.m: Test that class_conformsToProtocol() * obj-c.dg/gnu-api-2-class.m: Test that class_conformsToProtocol()
......
package body Opt13_Pkg is package body Opt13_Pkg is
subtype Index_Type is Natural range 0 .. 16; subtype Index_Type is Natural range 0 .. 16;
type Arr is array (Index_Type range <>) of Integer; type Arr is array (Index_Type range <>) of Integer;
type Rec is record type Rec is record
F1, F2, F3 : Float; F1, F2, F3 : Float;
N : Natural; N : Natural;
B1, B2 : Boolean; B1, B2 : Boolean;
F4 : Float; F4 : Float;
end record; end record;
type Data (D : Index_Type) is record type Data (D : Index_Type) is record
A : Arr (1 .. D); A : Arr (1 .. D);
R : Rec; R : Rec;
end record; end record;
Zero : constant Rec := (0.0, 0.0, 0.0, 0, False, False, 0.0); Zero : constant Rec := (0.0, 0.0, 0.0, 0, False, False, 0.0);
procedure Allocate (T : out My_Type) is procedure Allocate (T : out My_Type) is
begin begin
T := new Data (Index_Type'last); T := new Data (Index_Type'last);
T.R := Zero; T.R := Zero;
for I in 1 .. T.A'last loop for I in 1 .. T.A'last loop
N := 1; N := 1;
end loop; end loop;
end; end;
end Opt13_Pkg; end Opt13_Pkg;
package Opt13_Pkg is package Opt13_Pkg is
N : Natural := 0; N : Natural := 0;
type My_Type is private; type My_Type is private;
procedure Allocate (T : out My_Type); procedure Allocate (T : out My_Type);
private private
type Data; type Data;
type My_Type is access Data; type My_Type is access Data;
end Opt13_Pkg; end Opt13_Pkg;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment