Is that an almost correct piece of code? What sort of situation would something like that come up in?
What does occur many times is you mess up your stack, or mess with other memory in your heap, causing segmentation faults for various other reasons.