"John David Anglin" <[EMAIL PROTECTED]> writes: > > No, the ISO C standard is clear that the value of an uninitialized > > variable is indeterminate. It may be a trap representation, or it may > > be an unspecified value. In the latter case it must have the correct > > type. But there is no other restriction on it, and the standard > > specifically says (3.17.3) it "imposes no requirements on which value > > is chosen in any instance." > > Ok, then I believe that the register selection by reload might be > improved.
I think the place to address this, if indeed it should be addressed, is before reload. If a pseudo-register is used while uninitialized, you can replace the uses with whatever you like. That can be a constant 0 where that fits the instruction, or, if it is a direct assignment from the uninitialized pseudo-register to some other register or memory, you can just remove the assignment. But since correct programs rarely use uninitialized variables, optimizing them is likely to be overkill. Ian