anchor.diff:    end do
   
     res = derivative(id, &
  -                   num_points, &
  -                   num_variables, &
  +                   num_grid_points, &
  +                   num_density_variables, &
                      vector_length, &
                      density)
     deallocate(density)
  
positive.code:   end do
  
    res = derivative(id, &
                     num_points, &
                     num_variables, &
                     vector_length, &
                     density)
    deallocate(density)
  
negative.code:   call assert(ierr == 0, "xc_eval_setup failed")
  
    vector_length = 2**order
    allocate(density(vector_length, num_density_variables, num_grid_points))
    density = 0.0d0
    do ipoint = 1, num_grid_points
      ! we use fantasy values here
      density(1, 1, ipoint) = 1.0d0   ! zeroth order
      density(1, 2, ipoint) = 2.0d0   ! zeroth order
  