1 /* { dg-do run } */ 2 3 #include <stdio.h> 4 5 #include "init1.h" 6 #include "dump.h" 7 main(void)8int main (void) 9 { 10 struct R1 Local_R1; 11 struct R2 Local_R2; 12 13 put ("My_R1 :"); 14 dump (&My_R1, sizeof (struct R1)); 15 new_line (); 16 /* { dg-output "My_R1 : 78 56 34 12.*\n" } */ 17 18 put ("My_R2 :"); 19 dump (&My_R2, sizeof (struct R2)); 20 new_line (); 21 /* { dg-output "My_R2 : 12 34 56 78.*\n" } */ 22 23 Local_R1 = My_R1; 24 put ("Local_R1 :"); 25 dump (&Local_R1, sizeof (struct R1)); 26 new_line (); 27 /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ 28 29 Local_R2 = My_R2; 30 put ("Local_R2 :"); 31 dump (&Local_R2, sizeof (struct R2)); 32 new_line (); 33 /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ 34 35 Local_R1.I = 0x12345678; 36 37 put ("Local_R1 :"); 38 dump (&Local_R1, sizeof (struct R1)); 39 new_line (); 40 /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ 41 42 Local_R2.I = 0x12345678; 43 44 put ("Local_R2 :"); 45 dump (&Local_R2, sizeof (struct R2)); 46 new_line (); 47 /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ 48 49 Local_R1.I = Local_R2.I; 50 51 put ("Local_R1 :"); 52 dump (&Local_R1, sizeof (struct R1)); 53 new_line (); 54 /* { dg-output "Local_R1 : 78 56 34 12.*\n" } */ 55 56 Local_R2.I = Local_R1.I; 57 58 put ("Local_R2 :"); 59 dump (&Local_R2, sizeof (struct R2)); 60 new_line (); 61 /* { dg-output "Local_R2 : 12 34 56 78.*\n" } */ 62 63 new_line (); 64 return 0; 65 } 66