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