c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / gnat.dg / opt96_pkg.adb
blob60fdb0deb847b12c774ca96f6df9069bb67dd453
1 package body Opt96_Pkg is
3 function F (D : Data) return Integer is
4 X : constant Long_Float := Long_Float (D.Foo.Bar.X);
5 Y : constant Long_Float := Long_Float (D.Foo.Bar.Y);
6 begin
7 return Integer ((X * 1000.0) + (Y * 1000.0));
8 end;
10 function F (Self : Rec; D : Data'Class) return Integer is
11 Base_Data : constant Data := Data (D);
12 begin
13 return F (Base_Data);
14 end;
16 end Opt96_Pkg;