blob: 239d3f525b7912ade2fa0e3aa242f49972f79a65 [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//
Dale Johannesenc75bed92010-02-03 22:24:49 +000011// XFAIL: alpha,arm
Bill Wendling180e3e42009-11-30 22:23:29 +000012
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013struct Pubnames {
14 static int pubname;
15};
16
17int Pubnames::pubname = 10;
18
19int main (int argc, char** argv) {
20 Pubnames p;
21 return 0;
22}