------- Comment #2 from pinskia at gcc dot gnu dot org  2009-12-31 02:23 -------
Well with:      int32_t actuallyRead = read(&v, SIZE_OF_BYTE);

And inlining turned on all the way, this:
        if (toRead < 1)
     ...

        memcpy(data, _totPtr, toRead);

Becomes just:
*_totPtr = *data;
which in turn becomes:
* _totPtr = v;

So the issue is more complex and GCC needs uninitialized warning for memcpy and
arrays (and array SSA).

Most compilers don't implement array SSA really.  I Know of only two that do,
Jikes VM (IBM's Java JIT compiler) and another one which I forget about but it
is also a JIT IIRC.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42561

Reply via email to