blob: 3a08b3c3345bf0ea29c46fb287e1dc3e29e51994 [file] [log] [blame]
Jim Laskeyef455292006-11-30 15:31:49 +00001// This is a regression test on debug info to make sure that we can access
2// qualified global names.
Dan Gohman8a3f6442009-12-05 00:02:37 +00003// RUN: %llvmgcc -S -O0 -g %s -o - | \
Dan Gohmanfea1dd02009-08-25 15:38:29 +00004// RUN: llc --disable-fp-elim -o %t.s -O0
Chris Lattner3efa1a72008-03-10 06:52:10 +00005// RUN: %compile_c %t.s -o %t.o
Reid Spencer42e86fb2007-04-15 22:37:04 +00006// RUN: %link %t.o -o %t.exe
Devang Patel6748f042009-02-02 21:09:36 +00007// RUN: %llvmdsymutil %t.exe
Reid Spencer42e86fb2007-04-15 22:37:04 +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 Wendlingb25846e2009-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
Jim Laskeydd347eb2006-11-30 15:25:59 +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}