On Tue, 2011-07-19 at 13:28 +0200, Denys Duchier wrote:
David Malcolm dmalcolm@redhat.com writes:
tests/cpychecker/refcounts/fold_conditional: int vs Py_ssize_t issue. I seen that you're on i686. I've been doing my devel work on a 64-bit box; I think I may have accidentally assumed that a type coercion happens in this test. I'm interested in seeing what the output looks like when adding "-fdump-tree-gimple" to the gcc invocation line for that test on your machine (it should generate a file like "input.c.004t.gimple").
Here it is:
fold_conditional (struct PyObject * self, struct PyObject * args) { struct PyObject * D.11808; Py_ssize_t D.11809; struct _typeobject * D.11812; struct PyObject * list;
list = PyList_New (5); if (list == 0B) goto <D.11806>; else goto <D.11807>; <D.11806>: D.11808 = 0B; return D.11808; <D.11807>: D.11809 = MEM[(struct PyVarObject *)list].ob_size;
Thanks!
Interestingly both D.11809 and the "ob_size" field are declared as Py_ssize_t, so I'm not quite sure what's going on.
Having said that, I'm the middle of a big reworking of the state management, to better distinguish between l-values and r-values (so that I can sanely track reads/writes to arrays); hopefully I'll figure things out after that
Dave