blob: 5dd1439224ceba956caed326bd60deb54f07649a [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 | \
4// RUN: llc --disable-fp-elim -o %t.s -f
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
7// RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in
8// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10}
9// XFAIL: alpha|ia64|arm
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010struct Pubnames {
11 static int pubname;
12};
13
14int Pubnames::pubname = 10;
15
16int main (int argc, char** argv) {
17 Pubnames p;
18 return 0;
19}