1 /* { dg-do compile { target *-*-darwin* } } */
2 /* { dg-options "-O0 -gdwarf-2 -dA -fno-eliminate-unused-debug-types" } */
3 /* { dg-skip-if "Unmatchable assembly" { mmix-*-* } } */
4 /* { dg-final { scan-assembler "__debug_pubtypes" } } */
5 /* { dg-final { scan-assembler "long+\[ \t\]+0x\[0-9a-f]+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
6 /* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
7 /* { dg-final { scan-assembler "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
25 struct unused_struct
*next
;
29 main (int argc
, char **argv
)
32 struct used_struct
*my_list
;
34 my_list
= (struct used_struct
*) malloc (10 * sizeof (struct used_struct
));
36 for (i
= 0; i
< 10; i
++)
39 my_list
[i
].name
= (char *) malloc (11);
40 sprintf (my_list
[i
].name
, "Alice_%d", i
);
43 for (i
= 0; i
< 10; i
++)
44 fprintf (stdout
, "Key: %d, Name: %s\n", my_list
[i
].key
, my_list
[i
].name
);