iverilog fails to compile a module that uses an integer function to set the values of localparams.
I have confirmed that this fails in devel. A "sorry" message is generated, indicating missing functionality. I will take a look at adding the necessary functionality.
V0.9 does not support constant user functions, and correctly generates a "sorry" message indicating this.
I have submitted a patch on the patch tracker that adds the necessary functionality for this test case. Note that support for constant user functions is not yet complete - I will work on filling in the gaps.
I have applied the patches Martin submitted and this should be fixed in the latest development from git.