Home | History | Annotate | Download | only in host-tests
      1 // RUN: %clang %s -g -fexceptions %extra-clang-opts -o %t
      2 // RUN: %Test_jit_debuginfo %s %t
      3 // XFAIL: host-bcc
      4 // DEBUGGER: set breakpoint pending on
      5 // DEBUGGER: break %s:34
      6 // DEBUGGER: run
      7 // DEBUGGER: print s
      8 // CHECK: $1 = {d = 0.001, d2 = {10000, 100.5}}
      9 // DEBUGGER: continue
     10 
     11 struct double_struct {
     12   double d;
     13   double d2[2];
     14 } compound_double;
     15 
     16 
     17 float f = 0.f;
     18 float *pf = &f;
     19 
     20 const double d[2][2] = {{0, 1}, {2, 3.0}};
     21 struct double_struct s;
     22 
     23 unsigned short us = -1;
     24 const unsigned long l = 1;
     25 
     26 int main(int argc, char* argv[])
     27 {
     28   int f = 10; // shadow
     29 
     30   s.d = 10e-4;
     31   s.d2[0] = 1e4;
     32   s.d2[1] = 100.5;
     33 
     34   double result = pf[0] * d[1][1] * s.d * us * l;
     35   return (result == 0 ? 0 : -1);
     36 }
     37