http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49479
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-21 09:30:32 UTC --- Actually, thinking about it: "RESHAPE(allocatable_array, shape)" is *not* allocatable. trans-expr.c has: 147 if (!sym->attr.pointer && !sym->attr.allocatable 148 && sym->as && sym->as->type == AS_ASSUMED_SHAPE 149 && (gfc_option.allow_std & GFC_STD_F2008) != 0) One probably needs to check the actual argument, i.e. gfc_expr_attr(actual) with allocatable or pointer attribute - or type being C_PTR (including C_NULL_PTR). For the latter: expr->ts.type == BT_DERIVED && expr->ts.u.derived && expr->ts.u.derived->attr.is_iso_c && ??? (some check for ISOCBINDING_PTR)