PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / pubtypes-2.c
blob3ac3a3835c827bff4839b2c529a5342cc74c8eb7
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\]+0x13b+\[ \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" } } */
9 #include <stdlib.h>
10 #include <stdio.h>
12 struct used_struct
14 int key;
15 char *name;
18 struct unused_struct
20 int key1;
21 int f2;
22 double f3;
23 char *f4;
24 struct unused_struct *next;
27 int
28 main (int argc, char **argv)
30 int i;
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++)
37 my_list[i].key = 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);
45 return 0;