http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49648
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-06 06:43:37 UTC --- I tried something fancier by setting the proc_pointer/pointer attribute of sym->attr based on sym->result->attr, but that fails for proc_ptr_result_3.f90 (cf. failing patch below). -- In that case, "get_sub()" is a function, which returns a subroutine procedure pointer, i.e. "sym->result" is a subroutine while "sym" itself is a function. One solution would be, to save only the result attribute - in particular the attr.subroutine/attr.function - and construct a new result symbol, re-using as much as possible from "sym" itself. One just needs to make sure that one does not double free components. Alternatively, one should somehow make sure that also expressions below sym->result - in particular: sym->result->as->{lbound,ubound} - get fixed via a call to resolve_ref.