blob: b1df02d3facc5235f6525c3b38dc8fde41abb5e8 [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.
3// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \
Bill Wendling58ed5d22009-04-29 00:15:41 +00004// RUN: llc --disable-fp-elim -o %t.s -f -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}
Dan Gohman2a5ddf32009-07-24 00:30:09 +000010// XFAIL: alpha|arm
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011struct Pubnames {
12 static int pubname;
13};
14
15int Pubnames::pubname = 10;
16
17int main (int argc, char** argv) {
18 Pubnames p;
19 return 0;
20}