in the attached testcase, both GCC 4.5.20091214 and GCC 4.4.1 on Ubuntu 9.10 miss the uninitialized use warnings specified in the comments. it does correct catch the simple byte variable base, as noted in the comments.

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.

It seems like this analysis would succeed if the intrinsic memcpy for copying the [2] and [4] were inlined before this analysis. Is there a reason that the intrinsic version of memcpy isn't substituted in before this analysis is done? Am I missing something else?
What would be the implementation steps to fix this issue?

(In reply to comment #4)
>
> What would be the implementation steps to fix this issue?
1) Create a small self-contained testcase
2) Examine the dumps (-fdump-tree- options) and debug the compiler to know exactly why the warning is missing. Typical cases are common constant propagation, not enough alias information, not enough optimization, too much optimization, and bugs.
3) Propose a way to fix the above problem that does not regress on optimization.
4) Send a patch to gcc-patches (http://gcc.gnu.org/contribute.html)
5) Profit.
Any of those steps would help. Unfortunately, they have to be done in order.
Before confirming this, we would need to do (2), and we don't even have (1).