Debian Codegraph @

gcc/testsuite/gcc.dg/sso/q1.c

raw
1 /* { dg-do run } */
2
3 #include <stdio.h>
4
5 #include "init1.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.*\n" } */
25
26 put ("B1 :");
27 dump (&B1, sizeof (struct R1));
28 new_line ();
29 /* { dg-output "B1 : 78 56 34 12.*\n" } */
30
31 put ("A2 :");
32 dump (&A2, sizeof (struct R2));
33 new_line ();
34 /* { dg-output "A2 : 12 34 56 78.*\n" } */
35
36 put ("B2 :");
37 dump (&B2, sizeof (struct R2));
38 new_line ();
39 /* { dg-output "B2 : 12 34 56 78.*\n" } */
40
41 if (A1.I != B1.I) abort ();
42
43 if (A1.I != 0x12345678) abort ();
44
45 if (A2.I != B2.I) abort ();
46
47 if (A2.I != 0x12345678) abort ();
48
49 new_line ();
50 return 0;
51 }