Hey Asma,
To be fair it could be a problem with the gcc sources your compiling
with that was maybe fixed in the next commit or something.
I agree with Phil that your GENERIC code looks good. Just for future
postings, whenever you face a segmentation fault and you are unsure
about the root cause of the fault, it would be beneficial to always list
the GCC version (e.g. 4.6.0, trunk) that you faced your problems with.
By knowing the exact version, we would possibly be able to reproduce
your problems somehow.
So, which version of GCC are you facing your problems with?
git add remote gcc git://gcc.gnu.org/git/gcc.git
git fetch gcc
git merge gcc/master
And make clean&& make
If it's trunk then I would recommend to follow Phil's approach and get
the newest version. The trunk heavily is under development and might be
broken or unstable until it becomes a release version. If it's not the
trunk, then please let us know so that we could have a closer look again ...
Best regards,
Andi