Debian Codegraph @

gcc/testsuite/gcc.dg/sso/q6.c

raw
1 /* { dg-do run } */
2
3 #include <stdio.h>
4
5 #include "init6.h"
6 #include "dump.h"
7
8 #ifdef __cplusplus
9 extern "C"
10 #endif
11 void abort (void);
12
13 int main (void)
14 {
15 struct R1 A1 = My_R1;
16 struct R1 B1 = My_R1;
17
18 struct R2 A2 = My_R2;
19 struct R2 B2 = My_R2;
20
21 put ("A1 :");
22 dump (&A1, sizeof (struct R1));
23 new_line ();
24 /* { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */
25
26 put ("B1 :");
27 dump (&B1, sizeof (struct R1));
28 new_line ();
29 /* { dg-output "B1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } */
30 put ("A2 :");
31 dump (&A2, sizeof (struct R2));
32 new_line ();
33 /* { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */
34
35 put ("B2 :");
36 dump (&B2, sizeof (struct R2));
37 new_line ();
38 /* { dg-output "B2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } */
39
40 if (A1.I != B1.I || A1.N.A[0] != B1.N.A[0]) abort();
41
42 if (A2.I != B2.I || A2.N.A[0] != B2.N.A[0]) abort ();
43
44 new_line ();
45 return 0;
46 }