FORTRAN error *** glibc detected ***

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

I'm doing aproximation of derivative called five-point stencil. For every value of x, in interval [a,b], in step of 0.1 i need to calculate derivative.

  1. Relevant commands, code, scripts, algorithms:

The equation is like this:

Five-point stencil:
(-f(x + 2h) + 8f(x + h) - 8f(x - h) + f(x - 2h))/(12*h)
---> (-first+8*sec-8*third+fourth)/12*h

I want to calculate every of theese, so first, sec, third.... expression and then at the end calculate derivative.

  1. The attempts at a solution (include all code and scripts):
variables = 'x'
x=a+2*h
do while(x<=b)
variablesvalues=x
x=x+delta
call recog_variables (func, variables)
first(i)=evaluate(variablesvalues)
print*,'to je',first(i)
i=i+1
call destroyfunc()
end do



x=a+h  !without this, program works, prints first(i), but it doesn't print sec(i).

do while(x<=b)
variablesvalues=x
x=x+delta
call recog_variables (func, variables)
sec(i)=evaluate(variablesvalues)
print*,'to je',sec(i)
i=i+1
call destroyfunc()
end do
  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

I'm studying physics in Rijeka, University of Rijeka, Croatia, but it's not for exact course, I'm doing it because I want to learn...