blob: c6165a6e354c9f7d14cd9e24af53dad08b41f520 [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
10
11struct 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}