1 /* { dg-do run } */
2 
3 #include <stdio.h>
4 
5 #include "init3.h"
6 #include "dump.h"
7 
main(void)8 int main (void)
9 {
10   struct R1 Local_R1;
11   struct R2 Local_R2;
12 
13   Local_R1.S1   = My_R1.S1 - 1;
14   Local_R1.I    = My_R1.I + 1;
15   Local_R1.S2   = My_R1.S2 - 1;
16   Local_R1.N.C1 = My_R1.N.C1 % 16;
17   Local_R1.N.C2 = My_R1.N.C2 % 16;
18   Local_R1.N.C3 = My_R1.N.C3 % 16;
19   Local_R1.N.B  = My_R1.N.B % 2;
20 
21   put ("Local_R1 :");
22   dump (&Local_R1, sizeof (struct R1));
23   new_line ();
24   /* { dg-output "Local_R1 : 01 7c f3 2a 1e 02 82 01.*\n" } */
25 
26   Local_R2.S1   = My_R2.S1 - 1;
27   Local_R2.I    = My_R2.I + 1;
28   Local_R2.S2   = My_R2.S2 - 1;
29   Local_R2.N.C1 = My_R2.N.C1 % 16;
30   Local_R2.N.C2 = My_R2.N.C2 % 16;
31   Local_R2.N.C3 = My_R2.N.C3 % 16;
32   Local_R2.N.B  = My_R2.N.B % 2;
33 
34   put ("Local_R2 :");
35   dump (&Local_R2, sizeof (struct R2));
36   new_line ();
37   /* { dg-output "Local_R2 : 05 e2 af 37 c0 04 10 30.*\n" } */
38 
39   Local_R1.S1   = 2;
40   Local_R1.I    = 0x78ABCDEF;
41   Local_R1.S2   = 1;
42   Local_R1.N.C1 = 0x12;
43   Local_R1.N.C2 = 0x34;
44   Local_R1.N.C3 = 0x56;
45   Local_R1.N.B  = 4;
46 
47   put ("Local_R1 :");
48   dump (&Local_R1, sizeof (struct R1));
49   new_line ();
50   /* { dg-output "Local_R1 : c2 7b f3 2a 5e 12 9a 95.*\n" } */
51 
52   Local_R2.S1   = 2;
53   Local_R2.I    = 0x78ABCDEF;
54   Local_R2.S2   = 1;
55   Local_R2.N.C1 = 0x12;
56   Local_R2.N.C2 = 0x34;
57   Local_R2.N.C3 = 0x56;
58   Local_R2.N.B  = 4;
59 
60   put ("Local_R2 :");
61   dump (&Local_R2, sizeof (struct R2));
62   new_line ();
63   /* { dg-output "Local_R2 : 09 e2 af 37 bd 24 d2 b4.*\n" } */
64 
65   Local_R1.S1   = Local_R1.S1 - 1;
66   Local_R1.I    = Local_R1.I + 1;
67   Local_R1.S2   = Local_R1.S2 - 1;
68   Local_R1.N.C1 = Local_R1.N.C1 % 16;
69   Local_R1.N.C2 = Local_R1.N.C2 % 16;
70   Local_R1.N.C3 = Local_R1.N.C3 % 16;
71   Local_R1.N.B  = Local_R1.N.B % 2;
72 
73   put ("Local_R1 :");
74   dump (&Local_R1, sizeof (struct R1));
75   new_line ();
76   /* { dg-output "Local_R1 : 01 7c f3 2a 1e 02 82 01.*\n" } */
77 
78   Local_R2.S1   = Local_R2.S1 - 1;
79   Local_R2.I    = Local_R2.I + 1;
80   Local_R2.S2   = Local_R2.S2 - 1;
81   Local_R2.N.C1 = Local_R2.N.C1 % 16;
82   Local_R2.N.C2 = Local_R2.N.C2 % 16;
83   Local_R2.N.C3 = Local_R2.N.C3 % 16;
84   Local_R2.N.B  = Local_R2.N.B % 2;
85 
86   put ("Local_R2 :");
87   dump (&Local_R2, sizeof (struct R2));
88   new_line ();
89   /* { dg-output "Local_R2 : 05 e2 af 37 c0 04 10 30.*\n" } */
90 
91   new_line ();
92   return 0;
93 }
94