OSDN Git Service

8706c5c295a6a7c1857c638a9199e5ed75afa005
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / debug / pr35154.c
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 static char i_outer;
6 struct {
7    char f1;
8    char f2;
9 } opta;
10 struct {
11    char f1;
12    char f2;
13 } optb;
14
15 int
16 main()
17 {
18    static char i_inner[2];
19    i_inner[0] = 'a'; i_inner[1] = 'b';
20    opta.f1 = 'c';
21    opta.f2 = 'd';
22    optb.f1 = 'C';
23    optb.f2 = 'D';
24    i_outer = 'e';
25 /* { dg-do compile } */
26 /* { dg-skip-if "No stabs" { mmix-*-* *-*-netware* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } } */
27 /* { dg-skip-if "stabs only" { *-*-* } { "*" } { "-gstabs" } } */
28    return 0;
29 }
30
31 /* { dg-final { scan-assembler ".stabs.*i_inner:V" } } */
32 /* { dg-final { scan-assembler ".stabs.*i_outer:S" } } */
33 /* { dg-final { scan-assembler ".stabs.*opta:G" } } */
34 /* { dg-final { scan-assembler ".stabs.*optb:G" } } */