On Tue, Mar 17, 2015 at 06:28:03AM +0100, Paul Richard Thomas wrote: > Dear Tobias, > > As far as I can see, without the patch, gfc_get _derived_type goes > into a continuous loop trying to build the abstract type. Why this is > not the case with an additional non-procedure pointer component, I do > not know. I suspect that there is a corner case out there that will > challenge this patch but I was unable to generate it. I decided > therefore to commit, with an additional condition in the loop to > prevent repeated attempts to build the component field. > > Committed to trunk as revision 221474.
Note, the proc_ptr_comp_45.f90 testcase fails on i686-linux (unless -mfpmath=sse -msse2 or -ffloat-store) even at -O0, cos (1.570796327) is folded into constant and the runtime function doesn't return exactly the same result, because of extended precision. So, either you should allow a few ulps epsilon, or use some other function where you get reasonably exact result. Jakub