The attached patch resolves an infinite loop and segfault in generic_sym. The result allows the original test case to compile correctly. The attached test case compiles and executes correctly. I will commit shortly as OKed by Paul on IRC. Regression tested on x86-64-Gnu/Linux. Regards, Jerry 2007-07-28 Jerry DeLisle PR fortran/31609 * resolve.c (generic_sym): Check for a same symbol and if so, return to avoid infinite recursion.