]>
gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.dg/pubtypes-2.c
6669f3d3170d14afc74d7434e60875fd92253dec
1 /* { dg-do compile { target *-*-darwin* } } */
2 /* { dg-options "-O0 -gdwarf-2 -dA" } */
3 /* { dg-skip-if "Unmatchable assembly" { mmix-*-* } } */
4 /* { dg-final { scan-assembler "__debug_pubtypes" } } */
5 /* { dg-final { scan-assembler "long+\[ \t\]+0x12e+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
6 /* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
7 /* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
24 struct unused_struct
*next
;
28 main (int argc
, char **argv
)
31 struct used_struct
*my_list
;
33 my_list
= (struct used_struct
*) malloc (10 * sizeof (struct used_struct
));
35 for (i
= 0; i
< 10; i
++)
38 my_list
[i
].name
= (char *) malloc (11);
39 sprintf (my_list
[i
].name
, "Alice_%d", i
);
42 for (i
= 0; i
< 10; i
++)
43 fprintf (stdout
, "Key: %d, Name: %s\n", my_list
[i
].key
, my_list
[i
].name
);
This page took 0.040028 seconds and 4 git commands to generate.