The bug in the problem is fixed now.
Here is the solution:
I tested out to use fprintf(stderr, "test\n"); rather than printf("test\n"); and tested the code. It magically showed up the "test" in my console. It may have to do with the wrong inclusion order of the and file.
As I had this problem with the print I didn't check my other functions. Since I figured out, that the for-loop wasn't the problem I tested several prints after each command. I was able to detect the error in the void mpz_mul_base(mpz_t c, mpz_t a, mp_size_t i) function where I didn't check the case with c_part = 0. With this parameter the following code of the mpz_mul_base(c_part,c_part,i); function ran into an endless loop:
if(mpz_size(c) >= n)
for(i = mpz_size(c); i >= n; i--)
{
mpz_setlimbn(c, clear, i);
}
I replaced the >= with > and everything works fine now.