Home | History | Annotate | Download | only in FrontendC++
      1 // 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 - | \
      4 // RUN:   llc -disable-cfi --disable-fp-elim -o %t.s -O0
      5 // RUN: %compile_c %t.s -o %t.o
      6 // RUN: %link %t.o -o %t.exe
      7 // RUN: %llvmdsymutil %t.exe
      8 // 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}
     10 //
     11 // XFAIL: alpha,arm
     12 
     13 struct Pubnames {
     14   static int pubname;
     15 };
     16 
     17 int Pubnames::pubname = 10;
     18 
     19 int main (int argc, char** argv) {
     20   Pubnames p;
     21   return 0;
     22 }
     23