Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / sso / s7.c
blob4099943d128197c7210aecd52271fab800fd58ed
1 /* { dg-do run } */
3 #include <stdio.h>
5 #include "init7.h"
6 #include "dump.h"
8 int main (void)
10 struct R1 A1 = My_R1;
11 struct R2 A2 = My_R2;
13 struct Nested1 N1;
14 struct Nested2 N2;
16 int C1;
17 int C2;
18 int C3;
20 put ("A1 :");
21 dump (&A1, sizeof (struct R1));
22 new_line ();
23 /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */
25 put ("A2 :");
26 dump (&A2, sizeof (struct R2));
27 new_line ();
28 /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */
30 N1 = A1.N;
31 C1 = N1.C1;
32 C2 = N1.C2;
33 C3 = N1.C3;
35 printf ("C1 : %d\n", C1);
36 /* { dg-output "C1 : 11206674.*\n" } */
38 printf ("C2 : %d\n", C2);
39 /* { dg-output "C2 : 13434932.*\n" } */
41 printf ("C3 : %d\n", C3);
42 /* { dg-output "C3 : 15663190.*\n" } */
44 N1.C1 = C1;
45 N1.C2 = C2;
46 N1.C3 = C3;
47 A1.N = N1;
49 N2 = A2.N;
50 C1 = N2.C1;
51 C2 = N2.C2;
52 C3 = N2.C3;
54 printf ("C1 : %d\n", C1);
55 /* { dg-output "C1 : 11206674.*\n" } */
57 printf ("C2 : %d\n", C2);
58 /* { dg-output "C2 : 13434932.*\n" } */
60 printf ("C3 : %d\n", C3);
61 /* { dg-output "C3 : 15663190.*\n" } */
63 N2.C1 = C1;
64 N2.C2 = C2;
65 N2.C3 = C3;
66 A2.N = N2;
68 put ("A1 :");
69 dump (&A1, sizeof (struct R1));
70 new_line ();
71 /* { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */
73 put ("A2 :");
74 dump (&A2, sizeof (struct R2));
75 new_line ();
76 /* { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */
78 new_line ();
79 return 0;