search for: 2717_5

Displaying 2 results from an estimated 2 matches for "2717_5".

Did you mean: 27175
2011 Aug 10
0
[LLVMdev] Handling of pointer difference in llvm-gcc and clang
...gt; Is this a bug in llvm-gcc? in llvm-gcc (and dragonegg) this is coming directly from GCC's gimple: f (int * p, int * q) { long int D.2718; long int D.2717; long int p.1; long int q.0; int D.2714; <bb 2>: q.0_2 = (long int) q_1(D); p.1_4 = (long int) p_3(D); D.2717_5 = q.0_2 - p.1_4; D.2718_6 = D.2717_5 /[ex] 4; D.2714_7 = (int) D.2718_6; return D.2714_7; } Signed overflow in the difference of two long int (ptrdiff_t) values results in undefined behaviour according to the GCC type system, which is where the nsw flag comes from. The C front-end gener...
2011 Aug 10
3
[LLVMdev] Handling of pointer difference in llvm-gcc and clang
Hi, We are developing a bounded model checker for C/C++ programs (http://baldur.iti.kit.edu/llbmc/) that operates on LLVM's intermediate representation. While checking a C++ program that uses STL containers we noticed that llvm-gcc and clang handle pointer differences in disagreeing ways. Consider the following C function: int f(int *p, int *q) { return q - p; } Here's the