add function problem

Hello,

could someone tell me why this peace of bro-code makes a segmentation fault?