1 /* Test to make sure that stabs for C symbols that go into .comm have the
2    proper structure.  These should be lettered G for the struct that gives
3    the name to the .comm, and should be V or S for .lcomm symbols.  */
4 
5 __attribute__ ((used))
6 static char i_outer;
7 struct {
8    char f1;
9    char f2;
10 } opta;
11 struct {
12    char f1;
13    char f2;
14 } optb;
15 
16 int
main()17 main()
18 {
19    static char i_inner[2] __attribute__ ((used));
20    i_inner[0] = 'a'; i_inner[1] = 'b';
21    opta.f1 = 'c';
22    opta.f2 = 'd';
23    optb.f1 = 'C';
24    optb.f2 = 'D';
25    i_outer = 'e';
26 /* { dg-do compile } */
27 /* { dg-skip-if "No stabs" { mmix-*-* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } } */
28 /* { dg-skip-if "stabs only" { *-*-* } { "*" } { "-gstabs" } } */
29    return 0;
30 }
31 
32 /* { dg-final { scan-assembler ".stabs.*i_inner:V" } } */
33 /* { dg-final { scan-assembler ".stabs.*i_outer:S" } } */
34 /* { dg-final { scan-assembler ".stabs.*opta:G" } } */
35 /* { dg-final { scan-assembler ".stabs.*optb:G" } } */
36