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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [scalar_mode_agg_compare.adb] - Blame information for rev 774

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

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
 
3
procedure Scalar_Mode_Agg_Compare is
4
 
5
   type Point is record
6
      Mapped : Boolean;
7
      Tag    : String (1 .. 2);  -- HImode
8
   end record;
9
   pragma Pack (Point);          -- Tag possibly at bitpos 1
10
 
11
   function My_Point return Point is
12
   begin
13
      return (Mapped => True, Tag => "XX");
14
   end;
15
 
16
   A, B : Point := My_Point;
17
begin
18
   -- The comparison below should find the two Tag fields equal and not
19
   -- attempt to take their address, which might not be byte aligned.
20
 
21
   if A.Tag /= B.Tag then
22
      raise Program_Error;
23
   end if;
24
end;
25
 

powered by: WebSVN 2.1.0

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