2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / debug / pr35154.c
blobfcb79256b00581a4795a7f29ce0b7e14fedca01a
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. */
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;
15 int
16 main()
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-*-* *-*-sysv5* *-*-vxworks* } { "*" } { "" } } */
27 /* { dg-skip-if "stabs only" { *-*-* } { "*" } { "-gstabs" } } */
28 return 0;
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" } } */