blob: 3a08b3c3345bf0ea29c46fb287e1dc3e29e51994 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001// This is a regression test on debug info to make sure that we can access
2// qualified global names.
Dan Gohman2b62af22009-12-05 00:02:37 +00003// RUN: %llvmgcc -S -O0 -g %s -o - | \
Dan Gohman2d65d352009-08-25 15:38:29 +00004// RUN: llc --disable-fp-elim -o %t.s -O0
Chris Lattner670f4512008-03-10 06:52:10 +00005// RUN: %compile_c %t.s -o %t.o
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006// RUN: %link %t.o -o %t.exe
Devang Patelf2894b32009-02-02 21:09:36 +00007// RUN: %llvmdsymutil %t.exe
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008// RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in
9// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10}
Bill Wendling180e3e42009-11-30 22:23:29 +000010//
11// XFAIL: alpha,arm,powerpc-apple-darwin
12// FIXME: This doesn't work for PPC Darwin because we turned off debugging on
13// that platform.
14
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015struct Pubnames {
16 static int pubname;
17};
18
19int Pubnames::pubname = 10;
20
21int main (int argc, char** argv) {
22 Pubnames p;
23 return 0;
24}