Pubnames test

llvm-svn: 32038
This commit is contained in:
Jim Laskey 2006-11-30 15:25:59 +00:00
parent 637b01fc6c
commit ae62bc1bb9

View File

@ -0,0 +1,19 @@
// This is a regression test on debug info to make sure that we can get a
// meaningful stack trace from a C++ program.
// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc --disable-fp-elim -o Output/Pubnames.s -f
// RUN: as Output/Pubnames.s -o Output/Pubnames.o
// RUN: g++ Output/Pubnames.o -o Output/Pubnames.exe
// RUN: ( echo "break main"; echo "run" ; echo "p Pubnames::pubname" ) > Output/Pubnames.gdbin
// RUN: gdb -q -batch -n -x Output/Pubnames.gdbin Output/Pubnames.exe | tee Output/Pubnames.out | grep '10'
// XFAIL: i[1-9]86|alpha|ia64|arm
struct Pubnames {
static int pubname;
};
int Pubnames::pubname = 10;
int main (int argc, char** argv) {
Pubnames p;
return 0;
}